linq转换
SELECT * FROM VM_CON_Article
WHERE MenuID = 248 AND ArticleRecursive = 0 OR
ArticleRecursive IN(SELECT ArticleID
FROM VM_CON_Article AS VM_CON_Article_1
WHERE MenuID = 245)
帮忙转成linq
谢谢
------解决方案--------------------var query= from vm in VM_CON_Article
let tmp=VM_CON_Article.Where(x=>x.MenuID ==245).Select(x=>x.ArticleID)
where vm.MenuID== 248 && vm.ArticleRecursive ==0
------解决方案--------------------
tmp.Contains(vm.ArticleRecursive )
select vm;
------解决方案--------------------var ary1=VM_CON_Article.Where(x=>x.MenuID ==245).Select(x=>x.ArticleID).ToList();
var ary=VM_CON_Article.Where(t=>t.MenuID== 248&& t.ArticleRecursive ==0
------解决方案-------------------- ary1.Contains(t.ArticleRecursive)).ToList();
------解决方案--------------------var query = from x in VM_CON_Article
where x.MenuID == 248 &&
x.ArticleRecursive = 0
------解决方案--------------------
VM_CON_Article.Where(y => y.MenuID == 245).Select(y => y.ArticleID).Contains(x.ArticleRecursive)