protected override async Task <IQueryable <DynamicEntity> > CreateFilteredQueryAsync(GetDynamicEntityListInput input)
        {
            var query = (await _repository.ExecuteDynamicQueryAsync(input.FilterGroup)).WhereIf(
                input.ModelDefinitionId.HasValue, x => x.ModelDefinitionId == input.ModelDefinitionId);

            return(query);
        }
        public async Task ShouldGetQueryByListFilter()
        {
            await WithUnitOfWorkAsync(async() =>
            {
                // Arrange
                var filters = new DynamicQueryGroup
                {
                    Type       = GroupType.And,
                    Conditions = new List <DynamicQueryCondition>
                    {
                        new DynamicQueryCondition {
                            FieldName = "price", Operator = DynamicQueryOperator.GreaterOrEqual, Value = 200
                        }
                    },
                };

                // Act
                var output = await(await _dynamicEntityRepository.ExecuteDynamicQueryAsync(filters)).ToListAsync();

                // Assert
                output.Count.ShouldBe(1);
                output[0].GetProperty("Name", "Book2");
            });
        }