protected override Task Handle(AddOperacaoCommand command, CancellationToken cancellationToken)
        {
            var tipoOperacao = OperacaoTipo.Parse(command.TipoOperacao);

            var operacao = new Operacao(command.Id, command.Data, tipoOperacao, command.Ativo, command.Quantidade, command.Preco, command.Conta);

            _operacaoRepository.Add(operacao);

            return(Task.FromResult(0));
        }
Esempio n. 2
0
 public void Add(Operacao obj)
 {
     _operacaoRepository.Add(obj);
 }