English 中文(简体)
OData 过滤器,具有多个前提
原标题:OData $filter with multiple predicates

如果我的模式有两个实体,即“People”和“Addresses”,而某个特定个人通过地址List导航财产获得的地址是零或更多,那么,我可以撰写一份备忘录,回答下列问题:

“Which人最后的名字在Smith和至少一个地址?”

在我看来,我只能在这里作一个假设,例如:

http:// localhost:55100/DemographicsDataservice.svc/People?$filter=endswith(>)。 大会,

(如果我尚未相信,我甚至能够写上一个提款人来处理第二个基点,在这种情况下,假定Im试图回答问题,“从Mary开始,用手工艺和首名名称结束”)

最佳回答

你可以肯定地将过滤器中的定点合并起来。 例如:

/People?$filter=endswith(LastName, Smith ) and startswith(FirstName, Mary )

For details around supported operators and such please see this page: http://www.odata.org/documentation/odata-version-2-0/uri-conventions#FilterSystemQueryOption Currently OData doesn t have a way to express the question "People which have at least one address". Depending on your data it might be feasible to download all People fulfilling the first criteria and determine those with address on the client instead.

问题回答

暂无回答




相关问题
WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don t feel like I m going down the right route. My issue is that most of the entities ...

Access WCF service on same server

I have a .NET website with a WCF service. How do I access the current operations context of my service? One possible work around is to just make a call to the service within the app...but that seems ...

WCF binding error

So I got into work early today and got the latest from source control. When I try to launch our ASP.NET application, I get this exception: "The binding at system.serviceModel/bindings/wsHttpBinding ...

The service operation requires a transaction to be flowed

I am facing strange issue with our WCF service. The same code was working fine until recently we added more OperationContracts(Web Methods). We have common 3 tier architecture. DAL (WCF) BLL Web ...

热门标签