コード例 #1
0
 public override int SaveChanges()
 {
     try
     {
         PopulateDates();
         return(base.SaveChanges());
     }
     catch (DbEntityValidationException ex)
     {
         throw new Exception(EfUtil.GetFullEntityException(ex));
     }
 }
コード例 #2
0
 public int SaveChanges(bool skipLogging)
 {
     try
     {
         var originalSkipLoggingValue = SkipLogging;
         SkipLogging = skipLogging;
         PopulateDates();
         var retVal = base.SaveChanges();
         SkipLogging = originalSkipLoggingValue;
         return(retVal);
     }
     catch (DbEntityValidationException ex)
     {
         throw new Exception(EfUtil.GetFullEntityException(ex));
     }
 }