// GET: Students public ActionResult Index(int page = 1) { StudentsModel studentsModel = new StudentsModel(new StudentsService(new StudentsRepository(new StudentsContext())), page); studentsModel.HandleRequest(); return(View("Students", studentsModel)); }
public ActionResult Index(StudentsModel studentsModel) { studentsModel.StudentsService = new StudentsService(new StudentsRepository(new StudentsContext())); studentsModel.HandleRequest(); ModelState.Clear(); return(View("Students", studentsModel)); }