public IHttpActionResult CreateBed(Bed bed) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _bedService.PostBed(bed); } catch { return(StatusCode(HttpStatusCode.InternalServerError)); } return(StatusCode(HttpStatusCode.Created)); }