Beispiel #1
0
 protected virtual EntityAudit CreateAudit(DbContext context, DbEntityEntry entry, EntityAuditAction action)
 {
     var audit = new EntityAudit {
         Action = action,
         EntityId = this.GetEntityId(context, entry),
         EntityType = entry.Entity.GetType().FullName,
         DateCreatedUtc = DateTime.UtcNow,
         Properties = new List<EntityAuditProperty>()
     };
     return audit;
 }
        protected virtual EntityAudit CreateAudit(DbContext context, DbEntityEntry entry, EntityAuditAction action)
        {
            var audit = new EntityAudit {
                Action         = action,
                AppDomain      = this.GetAppDomain(context, entry),
                UserName       = this.GetUserName(context, entry),
                IdentityType   = this.GetIdentitType(context, entry),
                EntityID       = this.GetEntityId(context, entry),
                EntityType     = entry.Entity.GetType().FullName,
                DateCreatedUtc = DateTime.UtcNow,
                Properties     = new List <EntityAuditProperty>()
            };

            return(audit);
        }