public async Task Handle(TransactionCreatedIntegrationEvent @event) { var hub = new TransactionsHub(_hubContext); await hub.TransactionCreated(new TransactionCreatedDto { ToAccountName = @event.ToAccountName, FromAccountName = @event.FromAccountName, NewBalance = @event.NewBalance, TransactionId = @event.TransactionId }); }
public async Task Handle(TransactionCreateFailedIntegrationEvent @event) { var hub = new TransactionsHub(_hubContext); await hub.TransactionCreateFailed(new TransactionCreateFailedDto { ToAccountName = @event.ToAccountName, FromAccountName = @event.FromAccountName, Amount = @event.Amount, Reason = @event.Reason }); }