Beispiel #1
0
 public IActionResult Post([FromBody] ContaCorrenteViewModel model)
 {
     try
     {
         return(Ok(app.Add(model)));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Beispiel #2
0
        public void Insert()
        {
            var contaCorrenteViewModel = new ContaCorrenteViewModel
            {
                Ativo              = true,
                Saldo              = 0,
                DataInclusao       = System.DateTime.Now.ToString("yyyMMdd"),
                NrConta            = "7654321",
                Digito             = 1,
                IdCliente          = 2,
                UsuarioAlteracaoId = 1,
                UsuarioInclusaoId  = 1
            };

            var requestResult = app.Add(contaCorrenteViewModel);

            Assert.True(requestResult.Mensagens.Any(), (requestResult.Mensagens.Any() ? requestResult.Mensagens[0] : "Sucesso"));
        }