protected virtual void OnAfter(DbEntityEntry item, EntityState state, InterceptionContext context) { }
protected virtual void OnAfterDelete(DbEntityEntry entry, T item, InterceptionContext context) { }
protected override void OnBeforeUpdate(DbEntityEntry entry, IAmAuditable item, InterceptionContext context) { Logger.Trace("OnBeforeInsert"); item.Updated = DateTime.UtcNow; item.UpdatedBy = principalProvider.GetCurrent().Identity.Name; base.OnBeforeUpdate(entry, item, context); }
protected virtual void OnBeforeUpdate(DbEntityEntry entry, T item, InterceptionContext context) { }
protected override void OnBeforeInsert(DbEntityEntry entry, IBelongToOrganization item, InterceptionContext context) { Logger.Trace("OnBeforeInsert"); if (item.Organization == null) { item.Organization = tenantOrganizationProvider.GetTenantOrganization(); } base.OnBeforeInsert(entry, item, context); }