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)); }
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)); }
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()); }
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)); }
public async Task <IActionResult> PutHotelRoom(HotelRoomDTO hotelRoom) { var updateRoom = await _hotelRoom.UpdateHotelRoom(hotelRoom); return(Ok(updateRoom)); }