Beispiel #1
0
        public ActionResult LoginAs()
        {
            var listaStudentow = _context.Students.ToList();

            var listaStudentowModel = new StudentDropDownListModel
            {
                Students = listaStudentow
            };

            return(View(listaStudentowModel));
        }
        public ActionResult HomeStudent(StudentDropDownListModel studentModel)
        {
            var student = _context.Students.Include(c => c.Courses).SingleOrDefault(s => s.Id == studentModel.MyStudentsId);

            return(View(student));
        }