public override int SaveChanges() { try { PopulateDates(); return(base.SaveChanges()); } catch (DbEntityValidationException ex) { throw new Exception(EfUtil.GetFullEntityException(ex)); } }
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)); } }