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

Linq怎么写子查询的语句?
SQL中大概这样的

SQL code
select * from 表
where id not in( select id from 表 where xxxx)



转换成Linq该怎么写

------解决方案--------------------

C# code


var query = from p in a where !(from p1 in a select p1.id).Contains(p.id) select p

------解决方案--------------------
探讨
SQL中大概这样的


SQL code
select * from 表
where id not in( select id from 表 where xxxx)



转换成Linq该怎么写