Comments on: Using LINQ with the MOSS UserProfileManager https://blog.hompus.nl/2009/03/03/using-linq-with-the-moss-userprofilemanager/ Because I like to share knowledge Mon, 29 Jun 2009 08:01:40 +0000 hourly 1 https://wordpress.org/?v=5.2.4 By: Filipe Cavalcante https://blog.hompus.nl/2009/03/03/using-linq-with-the-moss-userprofilemanager/#comment-5 Mon, 29 Jun 2009 08:01:40 +0000 http://hompus.wordpress.com/2009/03/03/using_linq_with_the_moss_userprofilemanager/#comment-5 Hello there!
That is a nice post!
But I have a question. I need to do a search into my UserProfiles to find whom i want, but this in my SSP i have more than 9thousand users sincronized with AD.
how could i make this search into these all users from SSP without crash my connection. lol
see my code (very simple):
UserProfileManager allUsers = new UserProfileManager(context);
List fullSet = new List();
foreach (UserProfile user in allUsers)
{
fullSet.Add(user);
}
return from user in fullSet
where (user["FirstName"].Value != null) ? user["FirstName"].Value.ToString().ToLower().Contains(Nome.ToLower()) : user["AccountName"].Value.ToString().ToLower().Contains(Nome.ToLower())
select user;
Thx anyway!
(sorry about my english... just learning yet! =D)

]]>