示例#1
0
 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
 }
示例#2
0
 public SaveResult SaveChanges(JObject saveBundle)
 {
     return(_repository.SaveChanges(saveBundle));
 }