http://services.odata.org/V4/Northwind/Northwind.svc/
我尝试一次性获取所有Customers
,他们的Orders
和相应的Order_Details
,并使用嵌套的$expand
。为了查询数据,我使用以下链接:http://services.odata.org/V4/Northwind/Northwind.svc/Customers?$expand=Orders($expand=Order_Details)
现在我想要使用$select
限制数据。问题是我找不到正确的语法来对中间表Orders
使用$select
。我只能将其应用于顶部表格Customers
和底部表格Order_Details
,如下所示:
是否可能也为其中的表格(在我的情况下为Orders
)使用$select?
QueryByCube
,以构建这种类型的服务查询,可使用OData协议进行查询。在此处阅读更多信息:AdaptiveLINQ。 - nlipsMyService.svc?$select=CustomerID,OrderDate,TotalSales
。 - nlips