public async Task <IActionResult> Create([Bind("Id,Descricao,Serie,Turno")] Turmas turmas) { if (ModelState.IsValid) { _context.Add(turmas); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(turmas)); }
public async Task <IActionResult> Create([Bind("ID,Title,ReleaseDate,Genre,Price,Rating")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("CategoryId,CategoryName,UrlSlug,Description")] Category category) { if (ModelState.IsValid) { _context.Add(category); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(category)); }
public async Task <IActionResult> Create([Bind("Id,Nome,CodInep")] Escola escola) { if (ModelState.IsValid) { _context.Add(escola); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(escola)); }
public async Task <IActionResult> Create([Bind("Id,Nome,DataNascimento,Cpf")] Aluno aluno) { if (ModelState.IsValid) { _context.Add(aluno); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(aluno)); }