// DELETE: api/Employees/5 public IHttpActionResult DeleteHotelReservation(int hotelReservationId) { //Hotel remove_hotel = db.Hotels.Find(hotelId); HotelReservation remove_hotel = _hotelReservationService.Queryable().Where(c => c.Id == hotelReservationId).FirstOrDefault(); //bool remove_hotel_result = _hotelReservationService.Delete(remove_hotel.Id); if (remove_hotel == null) { return(NotFound()); } //db.Hotels.Remove(remove_hotel); //try //{ // // db.SaveChanges(); //} //catch (DbUpdateConcurrencyException ex) //{ // return BadRequest(ex.Message); //} return(Ok(remove_hotel)); }