Esempio n. 1
0
        public Task <bool> Handle(CadastrarPagamentoCommand message, CancellationToken cancellationToken)
        {
            if (!message.IsValid())
            {
                NotifyValidationErrors(message);
                return(Task.FromResult(false));
            }

            return(Task.FromResult(true));
        }
Esempio n. 2
0
        public void CadastrarPagamento(Guid clienteId)
        {
            var cadastrarPagamentoCommand = new CadastrarPagamentoCommand(clienteId);

            _bus.SendCommand(cadastrarPagamentoCommand);
        }