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));
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the AuditIdentityDbContext
 /// </summary>
 public AuditIdentityDbContext() : base()
 {
     _helper.SetConfig(this);
 }