Linq如何写子查询的语句
Linq怎么写子查询的语句?
SQL中大概这样的
转换成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
------解决方案--------------------