breezewebapiconfig globalconfiguration.configuration.routes.maphtTproute( 名称:“Breezeapi”, RouteTemplate:“Breeze / {Controller} / {ocction}” );

我有一个微风控制器

[HttpGet]
    public IQueryable<Customer> Customers()
    {
        return _context.Customers;
    }


http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA'
.

工作正常

但是当我将2个过滤条件传递为响亮区时,但查询只执行第一个参数,忽略了第2个参数????

http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA' && Region eq 10 
.

有帮助吗?

解决方案

odata查询语法使用'和'加入查询条款,因此请尝试:

http://hostname:55946/breeze/Breeze/Customers?$filter=Country eq 'USA' and Region eq 10 
.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top