Created
November 29, 2010 20:19
-
-
Save ragnard/720541 to your computer and use it in GitHub Desktop.
Attribute Scoped Queries made easier.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Group | |
{ | |
[DirectoryAttribute("member")] | |
public IList<string> Members { get; set; } | |
} | |
public class User | |
{ | |
[DirectoryAttribute("objectGUID")] | |
public Guid ObjectGUID { get; set; } | |
[DirectoryAttribute("sAMAccountName")] | |
public string SamAccountName { get; set; } | |
} | |
var members = Session.Search<Group, User>("CN=Domain Users,CN=Users,DC=example,DC=com", g => g.Members, "(objectClass=*)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment