//Get: TutorManager
        public ActionResult Index(string Class_Code = null)
        {
            List <Tutors>        tutors;
            List <ClassGrouping> classGroupings = classes.Collection().ToList();

            if (Class_Code == null)
            {
                tutors = context.Collection().ToList();
            }
            else
            {
                tutors = context.Collection().Where(t => t.Class_Code == Class_Code).ToList();
            }

            TutorListViewModel model = new TutorListViewModel();

            model.Tutors         = tutors;
            model.ClassGroupings = classGroupings;

            return(View(model));
        }
Beispiel #2
0
 public TutorsListPage()
 {
     InitializeComponent();
     BindingContext = _viewModel = new TutorListViewModel();
 }