public IHttpActionResult PutParent(string id, ParentInfoDTO parent) { if (parentsService.ExistsID(id) == false) { return(NotFound()); } return(Ok(parentsService.PutParent(id, parent))); }
public IHttpActionResult PutParent(string id, ParentDTO parentDto) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } bool done = service.PutParent(id, parentDto); if (done == false) { return(BadRequest()); } return(StatusCode(HttpStatusCode.NoContent)); }