コード例 #1
0
        public async Task <ActionResult> Create([FromBody] NightClubCreateInputModel inputModel)
        {
            var userId    = User.GetCurrentUserId();
            var nightClub = await this.nightClubService.CreateAsync(inputModel.Name, inputModel.CoverUrl, inputModel.Description, inputModel.BusinessHours, inputModel.Location, inputModel.TelephoneForReservations, userId);

            return(this.Created(nameof(Create), nightClub.Name));
        }
コード例 #2
0
 public async Task <string> CreateNightClubAsync(NightClubCreateInputModel nightClub)
 => await this.PostAsJsonAsync <NightClubCreateInputModel, string>(this.applicationSettings.NightClubAppUrl + "/Create", nightClub);