Angular 2 Kendo 网格不支持 odata v4

Muh*_*sal 5 odata kendo-ui angular

我确实尝试使用带有 odata v4 的 angular 2 kendo 网格进行服务器端过滤,但它显示“包含”关键字不支持。新版本使用 'substringof' 而不是 'contains' 我该如何解决这个问题

Muh*_*sal 0

安装Odata V4并配置WebApiConfig.cs

 ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
                var customer = builder.EntitySet<CustomerModel>("CustomerSearch");

                config.Routes.MapODataServiceRoute(
                  routeName: "odata",
                  routePrefix: "odata",
                  model: builder.GetEdmModel());
Run Code Online (Sandbox Code Playgroud)

'CustomerModel' 是我返回“CustomerSearch”控制器名称的模型

数据控制器

 [EnableQuery]
    public class CustomerSearchController : ODataController
    {

        [EnableQuery]
        public IQueryable<CustomerModel> Get()
        {
            CustomerModelResponse list = new CustomerModelResponse();
            try
            {
                list = CustomerBL.GetCustomer(0);
            }
            catch (Exception)
            {

                throw;
            }
            return list.CustomerList.AsQueryable();
        }

    }
Run Code Online (Sandbox Code Playgroud)