示例#1
0
        // 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));
        }
示例#2
0
        public ActionResult Index(StudentsModel studentsModel)
        {
            studentsModel.StudentsService = new StudentsService(new StudentsRepository(new StudentsContext()));

            studentsModel.HandleRequest();
            ModelState.Clear();

            return(View("Students", studentsModel));
        }