OData学习笔记

$filter 用法:

1,Return all products with category equal to “Toys”. http://localhost/Products?$filter=Category eq 'Toys'

2,Return all products with price less than 10. http://localhost/Products?$filter=Price lt 10

3,Logical operators: Return all products where price >= 5 and price <= 15.

    http://localhost/Products?$filter=Price ge 5 and Price le 15

4,String functions: Return all products with “zz” in the name. http://localhost/Products?$filter=substringof('zz',Name)

5,Date functions: Return all products with ReleaseDate after

猜你喜欢

转载自huzhupo.iteye.com/blog/2207564