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