public async Task <IActionResult> Create([Bind("Id,Question_statement,Time,CorrectAnswer,Options,Question_type")] Question question) { if (ModelState.IsValid) { _context.Add(question); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(question)); }
public async Task <IActionResult> Create([Bind("Id,Title,ReleaseDate,Genre,Price")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Departamento departamento) { if (ModelState.IsValid) { _context.Add(departamento); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(departamento)); }
public void Inserir(Vendedor vendedor) { _contexto.Add(vendedor); _contexto.SaveChanges(); }