Пример #1
0
        public async Task <IActionResult> PutHotel(int id, Hotel hotel)
        {
            if (id != hotel.Id)
            {
                return(BadRequest());
            }

            bool didUpdate = await repository.UpdateAsync(hotel);

            if (didUpdate == false)
            {
                return(NotFound());
            }

            return(NoContent());
        }