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(); }
public async Task OnGetAsync() { var spec = new ExamWithCourseAndTeacherSpecification(); Exam = await _service.ListAsync(spec); }