public PageModel(Entities.Lecture lecture, Entities.User user, CommitInfo commitInfo, string current_page_path, string branch, System.Dynamic.ExpandoObject viewBag) { this.lecture = lecture; Lecture = new Lecture(lecture); CommitInfo = commitInfo; CurrentPagePath = current_page_path; Branch = branch; ViewBag = viewBag; User = new User(user, user.IsTeacher(lecture) ? Role.Teacher : Role.Studnet); Teachers = lecture.GetTeachers().Where(x => x.IsTeacher(lecture)).Select(x => new User(x, Role.Teacher)); Students = lecture.GetTeachers().Where(x => x.IsStudent(lecture)).Select(x => new User(x, Role.Studnet)); }