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

            var updateHotelRoom = await _hotelRoom.UpdateHotelRoom(hotelRoom);

            return(Ok(updateHotelRoom));
        }
コード例 #2
0
        public async Task <IActionResult> PutHotelRoom(int HotelID, int roomNumber, HotelRoomDTO incomingData)
        {
            if (HotelID != incomingData.HotelID || roomNumber != incomingData.RoomNumber)
            {
                return(BadRequest());
            }

            var updatedHotelRoom = await _hotelRoom.UpdateHotelRoom(HotelID, roomNumber, incomingData);

            return(Ok(updatedHotelRoom));
        }
コード例 #3
0
        public async Task <IActionResult> PutHotelRoom(int id, int roomNumber, HotelRoom hotelRoom)
        {
            if (id != hotelRoom.HotelID || roomNumber != hotelRoom.RoomNumber)
            {
                return(BadRequest());
            }

            await _context.UpdateHotelRoom(id, hotelRoom);

            return(NoContent());
        }
コード例 #4
0
        public async Task <IActionResult> PutHotelRoom(int hotelid, int roomid, HotelRoom hotelRoom)
        {
            if (hotelid != hotelRoom.HotelID && roomid != hotelRoom.RoomID)
            {
                return(BadRequest());
            }

            var updatedRoom = await _hotelRoom.UpdateHotelRoom(hotelid, roomid, hotelRoom);

            return(Ok(updatedRoom));
        }
コード例 #5
0
        public async Task <IActionResult> PutHotelRoom(HotelRoomDTO hotelRoom)
        {
            var updateRoom = await _hotelRoom.UpdateHotelRoom(hotelRoom);

            return(Ok(updateRoom));
        }