// PUT api/<controller>/5 public void Put(CatModel cat) { if (cat != null) { bool?ret = CatModel.Update(cat); if (ret == null) { throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Error updating your cat.")); } } }