Example #1
0
        public async Task TriggerEventsAsync(EntityChangeReport changeReport)
        {
            await TriggerEventsInternalAsync(changeReport).ConfigureAwait(false);

            if (changeReport.IsEmpty() || UnitOfWorkManager.Current == null)
            {
                return;
            }

            await UnitOfWorkManager.Current.SaveChangesAsync().ConfigureAwait(false);
        }
        public async Task TriggerEventsAsync(EntityChangeReport changeReport)
        {
            await TriggerEventsInternalAsync(changeReport);

            if (changeReport.IsEmpty() || _unitOfWorkManager.Current == null)
            {
                return;
            }

            await _unitOfWorkManager.Current.SaveChangesAsync();
        }
        public Task TriggerEventsAsync(EntityChangeReport changeReport) //TODO: Trigger events really async!
        {
            TriggerEventsInternal(changeReport);

            if (changeReport.IsEmpty() || _unitOfWorkManager.Current == null)
            {
                return(Task.FromResult(0));
            }

            return(_unitOfWorkManager.Current.SaveChangesAsync());
        }
        public virtual void TriggerEvents(EntityChangeReport changeReport)
        {
            TriggerEventsInternal(changeReport);

            if (changeReport.IsEmpty() || _unitOfWorkManager.Current == null)
            {
                return;
            }

            _unitOfWorkManager.Current.SaveChanges();
        }
Example #5
0
 public Task TriggerEventsAsync(EntityChangeReport changeReport)
 {
     return(Task.CompletedTask);
 }
 protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport)
 {
     await TriggerEntityChangeEvents(changeReport.ChangedEntities);
     await TriggerDomainEvents(changeReport.DomainEvents);
 }
 public void TriggerEvents(EntityChangeReport changeReport)
 {
 }
Example #8
0
 protected virtual async Task TriggerEventsInternalAsync(EntityChangeReport changeReport)
 {
     await TriggerEntityChangeEvents(changeReport.ChangedEntities).ConfigureAwait(false);
     await TriggerLocalEvents(changeReport.DomainEvents).ConfigureAwait(false);
     await TriggerDistributedEvents(changeReport.DistributedEvents).ConfigureAwait(false);
 }
 public virtual void TriggerEventsInternal(EntityChangeReport changeReport)
 {
     TriggerEntityChangeEvents(changeReport.ChangedEntities);
     TriggerDomainEvents(changeReport.DomainEvents);
 }