コード例 #1
0
 public override async Task <int> SaveChangesAsync()
 {
     try
     {
         return(await base.SaveChangesAsync());
     }
     catch (DbEntityValidationException e)
     {
         var newException = new FormattedDbEntityValidationException(e);
         throw newException;
     }
 }
コード例 #2
0
 public override int SaveChanges()
 {
     try
     {
         return(base.SaveChanges());
     }
     catch (DbEntityValidationException e)
     {
         var newException = new FormattedDbEntityValidationException(e);
         throw newException;
     }
 }