I want to retrieve the results of this query (Northwind Database):
var ent = new Entities();
var query = from c in ent.Customers
join o in ent.Orders on c.CustomerID equals o.CustomerID
join od in ent.Order_Details on o.OrderID equals od.OrderID
join p in ent.Products on od.ProductID equals p.ProductID
where p.ProductName == "Chai"
select c;
by using WCF Data Services. I type this (which doesn't work):
http://localhost:29792/WcfDataService1.svc/Customers?$select=CompanyName&$expand=Orders/Order_Details/Products?$filter='Name' eq 'Chai'
How should I type it correctly?
Although Join
isn't supported, navigation properties/associations are, and you can also use .Expand()
. So although you can't get it from .Join
, there are multiple ways to get the data you need.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.