Пример #1
0
        public async Task <IEnumerable <Subject> > GetActives(CancellationToken token = default)
        {
            var progressions = await _progressionService.GetAll(HttpContextAccessor.HttpContext.GetUser(), token);

            return(_stateService.AvailableSubjects.AsEnumerable().Where(x => progressions.Where(progression => !progression.Suspended).Any(progression => progression.SubjectId == x.Id)));
        }
Пример #2
0
        public async Task <IEnumerable <ProgressionResponse> > GetProgressions()
        {
            var progressions = await _progression.GetAll(HttpContext.GetUser(), HttpContext.RequestAborted);

            return(progressions.Select(x => new ProgressionResponse(x)));
        }