Show / Hide Table of Contents

Class EntityHistoryHelper

Inheritance
object
EntityHistoryHelper
Implements
IEntityHistoryHelper
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.EntityFrameworkCore.EntityHistory
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
Type Name Description
IAuditingStore auditingStore
Microsoft.Extensions.Options.IOptions<TOptions><AbpAuditingOptions> options
IClock clock
IJsonSerializer jsonSerializer
IAuditingHelper auditingHelper

Properties

AuditingHelper

Declaration
protected IAuditingHelper AuditingHelper { get; }
Property Value
Type Description
IAuditingHelper

AuditingStore

Declaration
protected IAuditingStore AuditingStore { get; }
Property Value
Type Description
IAuditingStore

Clock

Declaration
protected IClock Clock { get; }
Property Value
Type Description
IClock

JsonSerializer

Declaration
protected IJsonSerializer JsonSerializer { get; }
Property Value
Type Description
IJsonSerializer

Logger

Declaration
public ILogger<EntityHistoryHelper> Logger { get; set; }
Property Value
Type Description
Microsoft.Extensions.Logging.ILogger<TCategoryName><EntityHistoryHelper>

Options

Declaration
protected AbpAuditingOptions Options { get; }
Property Value
Type Description
AbpAuditingOptions

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
Type Description
System.Collections.Generic.List<T><EntityChangeInfo>

CreateEntityChangeOrNull(EntityEntry)

Declaration
protected virtual EntityChangeInfo CreateEntityChangeOrNull(EntityEntry entityEntry)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entityEntry
Returns
Type Description
EntityChangeInfo

GetChangeTime(EntityChangeInfo)

Declaration
protected virtual DateTime GetChangeTime(EntityChangeInfo entityChange)
Parameters
Type Name Description
EntityChangeInfo entityChange
Returns
Type Description
System.DateTime

GetEntityId(object)

Declaration
protected virtual string GetEntityId(object entityAsObj)
Parameters
Type Name Description
object entityAsObj
Returns
Type Description
string

GetPropertyChanges(EntityEntry)

Declaration
protected virtual List<EntityPropertyChangeInfo> GetPropertyChanges(EntityEntry entityEntry)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entityEntry
Returns
Type Description
System.Collections.Generic.List<T><EntityPropertyChangeInfo>

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
Type Description
bool

IsCreated(EntityEntry)

Declaration
protected virtual bool IsCreated(EntityEntry entityEntry)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entityEntry
Returns
Type Description
bool

IsDeleted(EntityEntry)

Declaration
protected virtual bool IsDeleted(EntityEntry entityEntry)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entityEntry
Returns
Type Description
bool

IsSoftDeleted(EntityEntry)

Declaration
protected virtual bool IsSoftDeleted(EntityEntry entityEntry)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entityEntry
Returns
Type Description
bool

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
Type Description
bool

ShouldSavePropertyHistory(PropertyEntry, bool)

Declaration
protected virtual bool ShouldSavePropertyHistory(PropertyEntry propertyEntry, bool defaultValue)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.ChangeTracking.PropertyEntry propertyEntry
bool defaultValue
Returns
Type Description
bool

UpdateChangeList(List<EntityChangeInfo>)

Declaration
public virtual void UpdateChangeList(List<EntityChangeInfo> entityChanges)
Parameters
Type Name Description
System.Collections.Generic.List<T><EntityChangeInfo> entityChanges

Implements

IEntityHistoryHelper
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft