public override InterceptionResult <int> SavingChanges(DbContextEventData eventData, InterceptionResult <int> result) { _auditContext = new DefaultAuditContext(eventData.Context); _helper.SetConfig(_auditContext); _auditScope = _helper.BeginSaveChanges(_auditContext); return(base.SavingChanges(eventData, result)); }
/// <summary> /// Initializes a new instance of the <see cref="AuditDbContext" /> class. /// </summary> /// <param name="options">The options.</param> protected AuditDbContext(DbContextOptions options) : base(options) { _helper.SetConfig(this); }
/// <summary> /// Initializes a new instance of the AuditIdentityDbContext /// </summary> public AuditIdentityDbContext() : base() { _helper.SetConfig(this); }