public Task <bool> Handle(CadastrarPagamentoCommand message, CancellationToken cancellationToken) { if (!message.IsValid()) { NotifyValidationErrors(message); return(Task.FromResult(false)); } return(Task.FromResult(true)); }
public void CadastrarPagamento(Guid clienteId) { var cadastrarPagamentoCommand = new CadastrarPagamentoCommand(clienteId); _bus.SendCommand(cadastrarPagamentoCommand); }