示例#1
0
 public async Task HandleAsync(Event @event)
 {
     var command = _serializer.Deserialize(@event);
     await _handler.HandleAsync(
         new DomainCommandContext(_queryEndpointId, command.CreateEventContext(_hubClientFactory)),
         command.Data);
 }
示例#2
0
        public async Task HandleAsync(DomainCommandContext context, TCommand command)
        {
            using (var transaction = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                await _domainCommandHandler.HandleAsync(context, command);

                transaction.Complete();
            }
        }