public async Task <IActionResult> Create([Bind("GradeId,GradeName,Section")] Grade grade) { if (ModelState.IsValid) { _context.Add(grade); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(grade)); }
public async Task <IActionResult> Create([Bind("StudentId,StudentName")] Student student) { if (ModelState.IsValid) { _context.Add(student); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(student)); }