// PUT: api/Employees/5 public IHttpActionResult PutHotelReservation(HotelReservation hotelReservation) { //ModelState["hotelReservation.CreatedBy"].Errors.Clear(); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _hotelReservationService.UpdateHotelReservation(hotelReservation); } catch (Exception ex) { return(BadRequest(ex.Message)); } return(StatusCode(HttpStatusCode.NoContent)); }