public async Task <IActionResult> Create([Bind("ID,Name,Quiz1,Quiz2,Quiz3,Assignment1,Assignment2,Assignment3,Exam")] FinalsData finalsData) { if (ModelState.IsValid) { _context.Add(finalsData); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(finalsData)); }
public async Task <IActionResult> Create([Bind("ID,Name,Course,Address,ContactNo")] StudentInfo studentInfo) { if (ModelState.IsValid) { _context.Add(studentInfo); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(studentInfo)); }