public IHttpActionResult PutProject(int id, Project project) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != project.ProjectId) { return(BadRequest()); } try { projectBusiness.PutProject(project); } catch (DbUpdateConcurrencyException) { if (!projectBusiness.ProjectExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }