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

linq 怎么实现 in
请问将下面的sql语句,转换成linq 怎么写?
SELECT * FROM tableA WHERE idfiled IN
(select top 10 idfiled from tableB group by idfiled order by count(*) DESC)

------解决方案--------------------
可以用contains
------解决方案--------------------
http://chenjianyi007.blog.163.com/blog/static/10020320520109802355766/
------解决方案--------------------
C# code

from c in db.tableAs 
where (from t in db.tableBs select t.idfiled).Take(10).ToList().Contains(c.idfiled)
select c;

------解决方案--------------------
探讨
请问将下面的sql语句,转换成linq 怎么写?
SELECT * FROM tableA WHERE idfiled IN
(select top 10 idfiled from tableB group by idfiled order by count(*) DESC)

------解决方案--------------------
探讨
请问将下面的sql语句,转换成linq 怎么写?
SELECT * FROM tableA WHERE idfiled IN
(select top 10 idfiled from tableB group by idfiled order by count(*) DESC)

------解决方案--------------------
http://blog.csdn.net/q107770540/article/details/5387946