public ActionResult TutorReady(string name) { var data = ts.TutorInfo(); var isRegistered = ts.unlockTutor(name); if (isRegistered == false) { ModelState.AddModelError("", "Преподаватель не зарегестрирован"); } var tvm = data.Select(d => new TutorsViewModel( d.TutorID, d.TutorName, d.Courses.Select(c => c.CourseName) )); return(PartialView(tvm)); }