Пример #1
0
        public async Task <IEnumerable <Exam> > FetchAsync(User user)
        {
            var spec  = new ExamFilterSpecification(user);
            var exams = await _examRepository.ListAsync(spec);

            return(exams.Where(x => x.Reserved));
        }
Пример #2
0
        public Exam GetById(int id, bool withOptions = false)
        {
            var spec = new ExamFilterSpecification(id, withOptions);

            return(_examRepository.GetSingleBySpec(spec));
        }