public async Task <IActionResult> Create([Bind("ID,Nome,Preco")] Models.Console console) { if (ModelState.IsValid) { _context.Add(console); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(console)); }
public async Task <IActionResult> Create([Bind("ID,Nome,Plataforma,Preco")] Jogo jogo) { if (ModelState.IsValid) { _context.Add(jogo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(jogo)); }
public async Task <IActionResult> Create([Bind("ID,Nome,CPF,RG,Email,Telefone")] Cliente cliente) { if (ModelState.IsValid) { _context.Add(cliente); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cliente)); }
public void Insert(Pedido obj) { _context.Add(obj); _context.SaveChanges(); }