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()); }