Hello
I've created two User entities. One is UserBase:DirectoryEntity and other is User:UserBase.
I have a property called Dn (distinguishedName) in UserBase which works fine if I create an instance of UserBase and use Linq on Dn.
However if I use an instance of User and query Dn="blah", I get an error in DirectorySource method GetCondition(BinaryExpression e)
//
// Find the order of the operands in the binary expression. At least one should refer to the entity type.
//
if (e.Left is MemberExpression && ((MemberExpression)e.Left).Member.DeclaringType == originalType)
Since property Dn is in class UserBase, DeclaringType is UserBase whereas originalType is User and thus the code throws an exception.
UserBase contains key information about users where as User contains a more expanded property list.