コード例 #1
0
        public async Task <IActionResult> PutHotelRoom(int id, HotelRoom hotelRoom)
        {
            if (id != hotelRoom.RoomId)
            {
                return(BadRequest());
            }

            bool didUpdate = await repository.UpdateHotelRoomAsync(hotelRoom);

            if (!didUpdate)
            {
                return(NotFound());
            }

            return(NoContent());
        }