예제 #1
0
        public ActionResult Index()
        {
            ClassViewModel viewModel = new ClassViewModel();
            List <Class>   classes   = ClassRepositoryFactory.GetRepository().GetAll();

            viewModel.ClassList = viewModel.GenerateClassList(classes);

            return(View(viewModel));
        }
예제 #2
0
        public IHttpActionResult classForm(int Id)
        {
            List <Student> result = new List <Student>();

            var ClassRepository = ClassRepositoryFactory.GetRepository();
            var StudentRepo     = StudentRepositoryFactory.GetRepository();

            result = StudentRepo.GetAllByClass(Id);
            return(Ok(result));
        }