コード例 #1
0
        public async Task <IActionResult> AddBed(BedViewModel newBed, long hotelId, long roomId)
        {
            if (ModelState.IsValid)
            {
                await bedService.AddBedAsync(newBed, roomId);

                return(RedirectToAction(nameof(HotelController.HotelInfo), "Hotel", new { hotelId }));
            }
            return(View(newBed));
        }