Class EntitySynchronizer<TEntity, TSourceEntityEto>
Inheritance
EntitySynchronizer<TEntity, TSourceEntityEto>
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public abstract class EntitySynchronizer<TEntity, TSourceEntityEto> : IDistributedEventHandler<EntityCreatedEto<TSourceEntityEto>>, IDistributedEventHandler<EntityUpdatedEto<TSourceEntityEto>>, IDistributedEventHandler<EntityDeletedEto<TSourceEntityEto>>, IEventHandler, ITransientDependency where TEntity : class, IEntity
Type Parameters
Name |
Description |
TEntity |
|
TSourceEntityEto |
|
Constructors
EntitySynchronizer(IObjectMapper, IRepository<TEntity>)
Declaration
public EntitySynchronizer(IObjectMapper objectMapper, IRepository<TEntity> repository)
Parameters
Properties
IgnoreEntityCreatedEvent
Declaration
protected bool IgnoreEntityCreatedEvent { get; set; }
Property Value
IgnoreEntityDeletedEvent
Declaration
protected bool IgnoreEntityDeletedEvent { get; set; }
Property Value
IgnoreEntityUpdatedEvent
Declaration
protected bool IgnoreEntityUpdatedEvent { get; set; }
Property Value
ObjectMapper
Declaration
protected IObjectMapper ObjectMapper { get; }
Property Value
Repository
Declaration
protected IRepository<TEntity> Repository { get; }
Property Value
Methods
FindLocalEntityAsync(TSourceEntityEto)
Declaration
protected abstract Task<TEntity?> FindLocalEntityAsync(TSourceEntityEto eto)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
Returns
Type |
Description |
Task<TEntity> |
|
HandleEventAsync(EntityCreatedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityCreatedEto<TSourceEntityEto> eventData)
Parameters
Returns
HandleEventAsync(EntityDeletedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityDeletedEto<TSourceEntityEto> eventData)
Parameters
Returns
HandleEventAsync(EntityUpdatedEto<TSourceEntityEto>)
Declaration
public virtual Task HandleEventAsync(EntityUpdatedEto<TSourceEntityEto> eventData)
Parameters
Returns
IsEtoNewerAsync(TSourceEntityEto, TEntity?)
Declaration
protected virtual Task<bool> IsEtoNewerAsync(TSourceEntityEto eto, TEntity? localEntity)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
TEntity |
localEntity |
|
Returns
MapToEntityAsync(TSourceEntityEto)
Declaration
protected virtual Task<TEntity> MapToEntityAsync(TSourceEntityEto eto)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
Returns
Type |
Description |
Task<TEntity> |
|
MapToEntityAsync(TSourceEntityEto, TEntity)
Declaration
protected virtual Task MapToEntityAsync(TSourceEntityEto eto, TEntity localEntity)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
TEntity |
localEntity |
|
Returns
TryCreateOrUpdateEntityAsync(TSourceEntityEto)
Declaration
[UnitOfWork]
protected virtual Task<bool> TryCreateOrUpdateEntityAsync(TSourceEntityEto eto)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
Returns
TryDeleteEntityAsync(TSourceEntityEto)
Declaration
[UnitOfWork]
protected virtual Task<bool> TryDeleteEntityAsync(TSourceEntityEto eto)
Parameters
Type |
Name |
Description |
TSourceEntityEto |
eto |
|
Returns
Implements
Extension Methods