문제

How would you make a join like this with Linq to Entities?

var resultA = client.GetFirstList().ToList();                   
var resultB = client.GetSecondList().ToList();

var d = (from b in resultB
         join a in resultA on b.AnICollection.Select(x => x.TypeId) equals a.TypeId 
select b)
도움이 되었습니까?

해결책

You should be able to query it like the following:

from a in context.Customers
join b in context.Orders
on a.CustomerID equals b.CustomerID
join c in context.AnICollection
on b.TypeID equals c.TypeID
select b
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top