public IHttpActionResult EditBed(Bed bed) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { _bedService.PutBed(bed); } catch { return(StatusCode(HttpStatusCode.InternalServerError)); } return(StatusCode(HttpStatusCode.NoContent)); }