public async Task <IActionResult> Create([Bind("ID,Valor,Quantidade,Broker,Data,Acao")] Venda venda)
        {
            if (ModelState.IsValid)
            {
                _context.Add(venda);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(venda));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("ID,Data")] Info info)
        {
            if (ModelState.IsValid)
            {
                _context.Add(info);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(info));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("ID,Nome,Codigo,Atividade")] Acao acao)
        {
            if (ModelState.IsValid)
            {
                _context.Add(acao);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(acao));
        }