日期:2014-05-20  浏览次数:20824 次

请教嵌套查询的linq语句如何写?
select aid, (select bid from b where bid = a.aid) from a
请问这条语句如何改成linq的写法?

------解决方案--------------------
from item in table1
select new
{
AID=aid,
BID=from item1 in b where bid = item.aid selct bid
}
------解决方案--------------------
from item in a
where (from t in b select bid).Contains(aid);