// PUT: api/Author/5 public HttpResponseMessage Put(int id, [FromBody] AuthorEntity entity) { var author = AuthorBLL.UpdateAuthor(id, entity); if (author == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.Created, author)); }