public async Task Handle(OrderPaidDomainEvent notification, CancellationToken cancellationToken) { var order = await _suitAlterationRepository.GetByIdAsync(notification.SuitAlterationId); // e.g. we can send payment info or whatever to the customer email await _notifierService.OnOrderPaidNotification(order.Id); }
public async Task <Unit> Handle(MarkOrderAsPaidCommand request, CancellationToken cancellationToken) { SuitAlteration suitAlteration = await _suitAlterationRepository.GetByIdAsync(request.SuitAlterationId); suitAlteration.MarkOrderAsPaid(); return(Unit.Value); }