public Result <List <Transaction> > Handle(ObterTransacoesCommand command) { var result = new Result <List <Transaction> >(); var transacoes = _transacaoRepository.ObterTransacoes(command.Data); result.Dado = transacoes; return(result); }
public List <Transaction> ObterTransacoes() { var command = new ObterTransacoesCommand { Data = DateTime.Now }; var handler = new TransacaoCommandHandler(); var result = handler.Handle(command); return(result.Dado); }