Check for null.

pull/1089/head
Halil ibrahim Kalkan 6 years ago
parent 6ba0ad6618
commit 230821750b

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

Loading…
Cancel
Save