public HttpResponseMessage SaveChanges(JObject saveBundle) { try { var result = _repository.SaveChanges(saveBundle) as SaveResult; return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (ValidationException ex) { return(ValidationError(ex)); } // EF catch (SaveException ex) { return(ValidationError(ex)); } // SaveGuard // Unknown exceptions become 500 - Internal Server Error }
public SaveResult SaveChanges(JObject saveBundle) { return(_repository.SaveChanges(saveBundle)); }