public async Task <IActionResult> Create([Bind("Id,Nome,Nascimento,NomeResponsavel,CpfResponsavel")] Aluno aluno) { if (ModelState.IsValid) { _context.Add(aluno); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(aluno)); }
public async Task <IActionResult> Create([Bind("Id,DataMatricula")] Matricula matricula) { if (ModelState.IsValid) { _context.Add(matricula); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(matricula)); }
public async Task <IActionResult> Create([Bind("Id,Nome,Nascimento,CPF")] Professor professor) { if (ModelState.IsValid) { _context.Add(professor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(professor)); }