首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

Linq如何写子查询的语句

2012-04-18 
Linq怎么写子查询的语句?SQL中大概这样的SQL codeselect * from 表where id not in( select id from 表 wh

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该怎么写

热点排行