//POST hotels public HttpResponseMessage Post([FromBody] Hotel hotel) { hotel.CreatedDate = DateTime.Today; hotel.UpdatedDate = DateTime.Today; HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, _hotelManager.AddHotel(hotel)); return(response); }
public IHttpActionResult Post(HotelViewModel hvmodel) { var h = _hotelManager.AddHotel(hvmodel); if (h == null) { return(NotFound()); } return(Ok(h)); }
public String AddHotel([FromBody] Hotels model) { return(_hotelManager.AddHotel(model)); }