public async Task ShouldFilterByField()
        {
            // Arrange

            // Act
            var output = await _dynamicEntityAppService.GetListAsync(new GetDynamicEntityListInput
            {
                ModelDefinitionId = DynamicEntityTestConsts.ModelDefinitionBookId,
                FilterGroup       = new DynamicQueryGroup
                {
                    Type       = GroupType.And,
                    Conditions = new List <DynamicQueryCondition>
                    {
                        new DynamicQueryCondition {
                            FieldName = "name", Operator = DynamicQueryOperator.Contain, Value = "1"
                        }
                    },
                }
            }
                                                                     );

            // Assert
            output.TotalCount.ShouldBe(1);
            output.Items[0].GetProperty <string>("name").ShouldBe("Book1");
            output.Items[0].GetProperty <float>("price").ShouldBe(100f);
        }
Beispiel #2
0
 public virtual Task <PagedResultDto <DynamicEntityDto> > GetListAsync(GetListInput input)
 {
     return(_service.GetListAsync(input));
 }