首页 > 代码库 > Linq 常用语句

Linq 常用语句

1、in
from p in 信息
where (new string[] {"10","14"}).Contains(p.编码)
select p

2、not in
from p in 信息
where !(new string[] {"10","14"}).Contains(p.编码)
select p