Ok, I'm using the Linq-to AD and I'm having a problem implementing a lambda expression for the where clause in the linq expression.
Basically, I'm getting a MethodCallExpression object of method type Func<User,bool> (user is the object that has all the Active Directory information) and the lambda expression that I put in is
ad.GetUser(x => x.AccountName == "first.last");
.
.
.
GetUser(Func<User,bool> user)
{
.
.
.
var src = from usr in users
where user.Invoke(usr)
select usr;
foreach (User u in src)
return u;
I know that the x is of type User, and i can get that, but what I need to be able to do is pull the x.AccountName and the "first.last" from the lambda expression. Anyone have any idea how to do this?
Thanks