public IQueryable <Ordem> GetAtivosMaisNegociados(SubmeteOrdemRequest command)
        {
            using (var connection = new MySqlConnection("Server=mysql;" +
                                                        "Database=torodb; " +
                                                        "Uid=root;" +
                                                        "Pwd=MySql2019!;"))
            {
                //var guid = Guid.NewGuid();
                var idPapel = connection.Query <int>($"select Id = @Id from TB_PAPEL where NOM_PAPEL = {command.Papel}");

                //var count = connection.Execute(@"insert MyTable(colA, colB) values (@a, @b)",
                //    new[] { new { a = 1, b = 1 }, new { a = 2, b = 2 }, new { a = 3, b = 3 } }
                //  );

                connection.Execute(@"INSERT INTO `TB_TRANSACAO` (" +
                                   "`IDT_TRANSACAO`, " +
                                   "`IDT_USUARIO`, " +
                                   "`IDT_PAPEL`, " +
                                   "`QTD_TRANSACAO`, " +
                                   "`VLR_UNIDADE_PAPEL`, " +
                                   "`DTA_TRANSACAO`)VALUES(" +
                                   "'@Id', " +
                                   "'@IdUsuario', " +
                                   "'@IdPapel', " +
                                   "'@QtdTransacao', " +
                                   "'@VlrUnidadePapel', " +
                                   "now());",
                                   new[] { new{ Id = 1, IdUsuario = 1, IdPapel = idPapel, QtdTransacao = command.Quantidade, VlrUnidadePapel = 0.40 } });
            }
            throw new NotImplementedException();
        }
        public IActionResult SubmeterOrdem(
            [FromServices] IMediator handler,
            [FromBody] SubmeteOrdemRequest command
            )
        {
            var result = handler.Send(command);

            return(Ok(result));
        }
 public void Setup()
 {
     //Request vindo preenchido na integração do SPB
     _submeteOrdem   = new SubmeteOrdemRequest();
     _mockRepository = new Mock <IContaCorrenteRepository>();
 }