C# 对于某些筛选器选项,使用Odata v4的剑道查询筛选器失败

C# 对于某些筛选器选项,使用Odata v4的剑道查询筛选器失败,c#,filter,kendo-ui,kendo-grid,odata,C#,Filter,Kendo Ui,Kendo Grid,Odata,我使用的是一个启用了服务器过滤的剑道网格,网格调用一个数据源,该数据源是一个web api控制器,它接受一个自定义模型绑定器(通过实现IModelBinder),该绑定器对Odata结果进行自定义排序和分页。现在,当使用某些过滤器选项时,我看到了一些问题 请注意,我已经修复了“substringof”的问题,因为使用odata v4的web服务不再确认前面解释的substringof函数。我尝试在网格配置中指定odata-v4,但也不起作用。因此,最终将过滤器转换为将自定义模型绑定器中的“sub

我使用的是一个启用了服务器过滤的剑道网格,网格调用一个数据源,该数据源是一个web api控制器,它接受一个自定义模型绑定器(通过实现IModelBinder),该绑定器对Odata结果进行自定义排序和分页。现在,当使用某些过滤器选项时,我看到了一些问题

请注意,我已经修复了“substringof”的问题,因为使用odata v4的web服务不再确认前面解释的substringof函数。我尝试在网格配置中指定odata-v4,但也不起作用。因此,最终将过滤器转换为将自定义模型绑定器中的“substringof”替换为“contains”

下面Url的工作请求工作并返回数据

?$top=5和$filter=(Id+eq+1+和+PaymentId+eq+11) ?$top=5和$filter=(Id+eq+1+和+PaymentId+gt+11) ?$top=5和$filter=(Id+eq+1+和+PaymentId+lt+11)

以下Url的“不工作”请求工作并返回异常。这大于或等于、小于或等于且不等于过滤器

?$top=5和$filter=(Id+eq+1+和+PaymentId+ge+11) ?$top=5和$filter=(Id+eq+1+和+PaymentId+le+11) ?$top=5和$filter=(Id+eq+1+和+PaymentId+ne+11)

{“消息”:“出现错误。”,“异常消息”:“应为” 右括号中的“ExceptionType”:“Kendo.Mvc.Infrastructure.Implementation.FilterParserException”,“StackTrace”:” 在 Mvc.Infrastructure.Implementation.FilterParser.Expect(FilterTokenType 令牌类型)\r\n位于 Kendo.Mvc.Infrastructure.Implementation.FilterParser.ParseNestedExpression()\r\n 在 Kendo.Mvc.Infrastructure.Implementation.FilterParser.PrimaryExpression()\r\n 在 Kendo.Mvc.Infrastructure.Implementation.FilterParser.ComparisonExpression()\r\n 在 Kendo.Mvc.Infrastructure.Implementation.FilterParser.AndExpression()\r\n 在 Kendo.Mvc.Infrastructure.Implementation.FilterParser.OrExpression()\r\n 在 Kendo.Mvc.Infrastructure.Implementation.FilterParser.Expression()\r\n 位于Kendo.Mvc.Infrastructure.Implementation.FilterParser.Parse()\r\n
在Kendo.Mvc.Infrastructure.FilterDescriptorFactory.Create(字符串 输入)\r\n位于 BindModel(HttpActionContext actionContext、ModelBindingContext和bindingContext)