public IActionResult Detail(int id) { var student = _respository.Detail(id); if (student == null) { return(RedirectToAction(nameof(Index))); } return(View(student)); }