public async Task <IActionResult> Create([Bind("Id,Grad")] Graduacao graduacao) { if (ModelState.IsValid) { _context.Add(graduacao); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(graduacao)); }
public async Task <IActionResult> Create([Bind("Id,Name")] Unidade unidade) { if (ModelState.IsValid) { _context.Add(unidade); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(unidade)); }