public IActionResult Edit(int id) { var student = _repo.ReadStudent(id); if (student == null) { return(RedirectToAction("Index", "Home")); } return(View(student)); }
public IActionResult Index([Bind(Prefix = "id")] int studentId) { var student = _repo.ReadStudent(studentId); if (student == null) { return(NotFound()); } return(View(student)); }