任何人都可以将此SQL转换为LINQ吗? [英] Can Anyone please convert this SQL into LINQ?
本文介绍了任何人都可以将此SQL转换为LINQ吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
select * from Table1 where ColCode in
(select distinct ColCode from Table2 where CodeNo = 12345678 and Active = 'Y')
推荐答案
var result = from t1 in Table1
where t1.ColCode in
(from t2 in Table2 where t2.CodeNo == 12345678 && t2.Active == 'Y' select t2.ColeCode).Distinct() select t1;
希望对您有帮助.
如果解决您的问题,则标记为答案.
hope it will help you..
mark as answer if solves your problem..
这篇关于任何人都可以将此SQL转换为LINQ吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文