转linq语句。。。
select * from dbo.BaseEmployee left join hrPersInfo
ON BaseEmployee.EmpID =hrPersInfo.EmpID
WHERE BaseEmployee.EmpID NOT IN
( select EmpID from dbo.hrPersInfo)
------解决方案--------------------from be in db.BaseEmployee
join pi in db.hrPersInfo
on be.EmpID equals pi.EmpID
where db.hrPersInfo.Select(x => x.EmpID).All(x => x != be.EmpID)
------解决方案--------------------怎么看这SQL语句,都觉得蛋疼~ 你这SQL语句里的left join这句有意义么
var query= from be in BaseEmployee
where !hrPersInfo.Select(h=>h.EmpID).Contains(be.EmpID)
select be;