Esempio n. 1
0
        public async Task OnGetAsync(Guid id)
        {
            var spec = new ExamWithCourseAndTeacherSpecification(id);

            Exam = await _examService.GetModelWithSpec(spec);

            Course = await _courseService.GetByIdAsync(Exam.CourseId);

            var stdentSpec = new ExamWithStudentAndCourseSpecification();

            var students = await _studentService.ListAsync(stdentSpec);

            Students = students.Where(s => s.Courses.Any(c => c.Id == Course.Id)).ToList();
        }
Esempio n. 2
0
        public async Task OnGetAsync()
        {
            var spec = new ExamWithCourseAndTeacherSpecification();

            Exam = await _service.ListAsync(spec);
        }