Ejemplo n.º 1
0
        private void Initialize()
        {
            this.courseService  = new TeacherCourseService();
            this.studentService = new TeacherStudentService();

            this.Courses = courseService
                           .GetTeacherCourses(User.UserId);

            var initializedCourse = this.Courses
                                    .FirstOrDefault();

            if (initializedCourse != null)
            {
                this.Students = studentService
                                .GetTeacherStudents(initializedCourse.CourseId);

                this.SelectedCourseName = courseService
                                          .GetCourseName(initializedCourse.CourseId);

                this.selectedCourseId = initializedCourse.CourseId;
            }
        }
Ejemplo n.º 2
0
 public CourseService(ICourseRepository courseRepository, ITeacherCourseService teacherCourseService)
 {
     _courseRepository     = courseRepository;
     _teacherCourseService = teacherCourseService;
 }