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