public ActionResult MainPanel() { var dataStud = ss.StudInfo().Where(s => s.ChangeStatus == true); var svm = dataStud.Select(d => new StudentViewModel( d.StudentName, d.Courses.Select(c => c.CourseName), d.UserPhoto )); var dataTut = ts.TutorInfo(); var tvm = dataTut.Select(d => new TutorsViewModel( d.TutorID, d.TutorName, d.Courses.Select(c => c.CourseName) )); TempData["Candidates"] = svm; TempData["Tutors"] = tvm; return(View()); }