예제 #1
0
        public async Task <List <EnrolmentList> > GetForCourseInstance(CourseInstanceBase courseInstance)
        {
            if (courseInstance == null)
            {
                return(null);
            }

            return(await GetForCourseInstance(courseInstance.CourseId, courseInstance.SemesterId));
        }
예제 #2
0
 public async Task <List <EnrolmentList> > GetAvailableForCourseInstance(CourseInstanceBase courseInstance, int examId)
 {
     return(await context.Enrolment
            .Where(_ => _.CourseId == courseInstance.CourseId &&
                   _.SemesterId == courseInstance.SemesterId &&
                   !_.StudentExam.Any(__ => __.ExamId == examId))
            .Select(_ => new EnrolmentList
     {
         Id = _.Id,
         Student = new StudentBase
         {
             Id = _.Student.Id,
             Firstname = _.Student.Firstname,
             Lastname = _.Student.Lastname,
             IndexNmb = _.Student.IndexNmb,
             Jmbag = _.Student.Jmbag
         }
     }).ToListAsync());
 }
예제 #3
0
 public async Task GetEnrolments(CourseInstanceBase courseInstance)
 {
     EnrolmentsList = await _enrolmentService.GetForCourseInstance(courseInstance);
 }