|
|
@ -65,13 +65,17 @@ namespace Volo.Abp.Domain.Entities.Events
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var eto = EntityToEtoMapper.Map(entity);
|
|
|
|
|
|
|
|
if (eto != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
DistributedEventBus,
|
|
|
|
DistributedEventBus,
|
|
|
|
typeof(EntityCreatedEto<>),
|
|
|
|
typeof(EntityCreatedEto<>),
|
|
|
|
EntityToEtoMapper.Map(entity),
|
|
|
|
eto,
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task TriggerEntityUpdatingEventAsync(object entity)
|
|
|
|
public virtual async Task TriggerEntityUpdatingEventAsync(object entity)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -92,13 +96,17 @@ namespace Volo.Abp.Domain.Entities.Events
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var eto = EntityToEtoMapper.Map(entity);
|
|
|
|
|
|
|
|
if (eto != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
DistributedEventBus,
|
|
|
|
DistributedEventBus,
|
|
|
|
typeof(EntityUpdatedEto<>),
|
|
|
|
typeof(EntityUpdatedEto<>),
|
|
|
|
EntityToEtoMapper.Map(entity),
|
|
|
|
eto,
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task TriggerEntityDeletingEventAsync(object entity)
|
|
|
|
public virtual async Task TriggerEntityDeletingEventAsync(object entity)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -119,6 +127,9 @@ namespace Volo.Abp.Domain.Entities.Events
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var eto = EntityToEtoMapper.Map(entity);
|
|
|
|
|
|
|
|
if (eto != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
await TriggerEventWithEntity(
|
|
|
|
DistributedEventBus,
|
|
|
|
DistributedEventBus,
|
|
|
|
typeof(EntityDeletedEto<>),
|
|
|
|
typeof(EntityDeletedEto<>),
|
|
|
@ -126,6 +137,7 @@ namespace Volo.Abp.Domain.Entities.Events
|
|
|
|
false
|
|
|
|
false
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport)
|
|
|
|
protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport)
|
|
|
|
{
|
|
|
|
{
|
|
|
|