public ActionResult Index() { ClassViewModel viewModel = new ClassViewModel(); List <Class> classes = ClassRepositoryFactory.GetRepository().GetAll(); viewModel.ClassList = viewModel.GenerateClassList(classes); return(View(viewModel)); }
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)); }