public Task HandleAsync(IDomainEvent <OrderAggregate, OrderId, OrderPaymentCompleted> domainEvent, ISagaContext sagaContext, CancellationToken cancellationToken) { completed = true; Publish(new AppointmentCompletedCommand(AppointmentId.With(base.Id.Value))); return(Task.CompletedTask); }
public async Task Handle(LocationSet @event) { var command = new AppointmentBookCommand(AppointmentId.With(@event.Id)); await commandBus.PublishAsync(command, cancellationToken : CancellationToken.None); }