Beispiel #1
0
        public async Task QueryDocument()
        {
            //Action
            var documents = await _reader.QueryAsync(q => q.Categories.Any(c => c.Code == "NG"));

            //Assert
            Assert.IsNotNull(documents);
            Assert.IsTrue(documents.Any());
        }
 public async Task <List <CategoryDto> > GetAsync(Func <CategoryDto, bool> query)
 {
     return(await _reader.QueryAsync(query));
 }
 public async Task <List <QuestionDto> > GetAsync(Func <QuestionDto, bool> query)
 {
     return(await _reader.QueryAsync(query));
 }
 public async Task <List <DifficultyLevelDto> > GetDefficultyLevelAsync()
 {
     return(await _difficultLevelReader.QueryAsync(aType => aType.MetadataType == "DifficultyLevel"));
 }
 public async Task <List <AnswerTypeDto> > GetAnswerTypesAsync()
 {
     return(await _answerTypeReader.QueryAsync(aType => aType.MetadataType == "AnswerType"));
 }
 public async Task <List <QuestionTypeDto> > GetQuestionTypesAsync()
 {
     return(await _questionTypeReader.QueryAsync(aType => aType.MetadataType == "QuestionType"));
 }