// GET: Students public ActionResult Index() { List <StudentModel> students = new List <StudentModel>(); StudentDAO studentDAO = new StudentDAO(); students = studentDAO.FetchAll(); return(View("Index", students)); }
public ActionResult Delete(int Id) { StudentDAO studentDAO = new StudentDAO(); studentDAO.Delete(Id); List <StudentModel> students = studentDAO.FetchAll(); return(View("Index", students)); }