예제 #1
0
        private static CountyUser GetUserByEmployeeId(PrincipalContext context, string id)
        {
            var userSearch = new CountyUser(context)
            {
                EmployeeId = id
            };
            var searcher = new PrincipalSearcher(userSearch);

            return(searcher.FindOne() as CountyUser);
        }
예제 #2
0
 private static CountyUser GetUserBySamAccountName(PrincipalContext context, string username)
 {
     return(CountyUser.FindByIdentity(context, IdentityType.SamAccountName, username));
 }