Class EntityHistoryHelper
Inheritance
object
EntityHistoryHelper
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Volo.Abp.EntityFrameworkCore.dll
Syntax
public class EntityHistoryHelper : IEntityHistoryHelper, ITransientDependency
Constructors
EntityHistoryHelper(IAuditingStore, IOptions<AbpAuditingOptions>, IClock, IJsonSerializer, IAuditingHelper)
Declaration
public EntityHistoryHelper(IAuditingStore auditingStore, IOptions<AbpAuditingOptions> options, IClock clock, IJsonSerializer jsonSerializer, IAuditingHelper auditingHelper)
Parameters
Properties
AuditingHelper
Declaration
protected IAuditingHelper AuditingHelper { get; }
Property Value
AuditingStore
Declaration
protected IAuditingStore AuditingStore { get; }
Property Value
Clock
Declaration
protected IClock Clock { get; }
Property Value
JsonSerializer
Declaration
protected IJsonSerializer JsonSerializer { get; }
Property Value
Logger
Declaration
public ILogger<EntityHistoryHelper> Logger { get; set; }
Property Value
Options
Declaration
protected AbpAuditingOptions Options { get; }
Property Value
Methods
CreateChangeList(ICollection<EntityEntry>)
Declaration
public virtual List<EntityChangeInfo> CreateChangeList(ICollection<EntityEntry> entityEntries)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.ICollection<T><Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry> |
entityEntries |
|
Returns
CreateEntityChangeOrNull(EntityEntry)
Declaration
protected virtual EntityChangeInfo CreateEntityChangeOrNull(EntityEntry entityEntry)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
Returns
GetChangeTime(EntityChangeInfo)
Declaration
protected virtual DateTime GetChangeTime(EntityChangeInfo entityChange)
Parameters
Returns
| Type |
Description |
| System.DateTime |
|
GetEntityId(object)
Declaration
protected virtual string GetEntityId(object entityAsObj)
Parameters
| Type |
Name |
Description |
| object |
entityAsObj |
|
Returns
GetPropertyChanges(EntityEntry)
Declaration
protected virtual List<EntityPropertyChangeInfo> GetPropertyChanges(EntityEntry entityEntry)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
Returns
GetTenantId(object)
Declaration
protected virtual Guid? GetTenantId(object entity)
Parameters
| Type |
Name |
Description |
| object |
entity |
|
Returns
| Type |
Description |
| System.Guid? |
|
IsBaseAuditProperty(PropertyInfo, Type)
Declaration
protected virtual bool IsBaseAuditProperty(PropertyInfo propertyInfo, Type entityType)
Parameters
| Type |
Name |
Description |
| System.Reflection.PropertyInfo |
propertyInfo |
|
| System.Type |
entityType |
|
Returns
IsCreated(EntityEntry)
Declaration
protected virtual bool IsCreated(EntityEntry entityEntry)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
Returns
IsDeleted(EntityEntry)
Declaration
protected virtual bool IsDeleted(EntityEntry entityEntry)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
Returns
IsSoftDeleted(EntityEntry)
Declaration
protected virtual bool IsSoftDeleted(EntityEntry entityEntry)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
Returns
ShouldSaveEntityHistory(EntityEntry, bool)
Declaration
protected virtual bool ShouldSaveEntityHistory(EntityEntry entityEntry, bool defaultValue = false)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry |
entityEntry |
|
| bool |
defaultValue |
|
Returns
ShouldSavePropertyHistory(PropertyEntry, bool)
Declaration
protected virtual bool ShouldSavePropertyHistory(PropertyEntry propertyEntry, bool defaultValue)
Parameters
| Type |
Name |
Description |
| Microsoft.EntityFrameworkCore.ChangeTracking.PropertyEntry |
propertyEntry |
|
| bool |
defaultValue |
|
Returns
UpdateChangeList(List<EntityChangeInfo>)
Declaration
public virtual void UpdateChangeList(List<EntityChangeInfo> entityChanges)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<T><EntityChangeInfo> |
entityChanges |
|
Implements
Extension Methods