我将如何将以下 sql 查询转换为 LINQ
select *
from groupprincipal.members
where displayname not in (select adusername
from employees)
我想列出 Active Directory 组中不在员工表中的所有成员
我试过了
var notLoggedIn = from groupMembers in groupPrincipal.Members
from loggedIn in employeeRepository.All
where groupMembers.DisplayName != loggedIn.ActiveDirectoryName
select groupMembers;
但你会知道它没有用。