如何将以下sql查询更改为Linq查询
select [like]
from FacebookLikes
where FacebookLikeCategoryID in (select FacebookLikeCategoryID
from FacebookLikeCategories
where UserID = 18)
答案 0 :(得分:0)
var inner = from cid in FacebookLikeCategories where cid.UserID = 18 select cid.FacebookLikeCategoryID;
var result = from res in FacebookLikes where inner.Contains(res.UserID) select res.[like];