public override void OnPostSaveChanges(DbContext context) { this.auditContext.SaveChanges(); this.auditContext.Dispose(); this.auditContext = null; base.OnPostSaveChanges(context); }
public override void OnPreSaveChanges(DbContext context) { this.auditContext = new EntityAuditDbContext(context.Database.Connection); base.OnPreSaveChanges(context); }