zspitz / ExpressionTreeToString

String representations of expression trees + library of expression tree objects
MIT License
151 stars 12 forks source link

Dynamic LINQ writer/visitor: Handle indexers and other methods when building `in` clauses #75

Closed zspitz closed 3 years ago

zspitz commented 4 years ago

This expression:

Expression<Func<Person, bool>> expr = p => p.LastName[0] == 'A' || p.LastName[0] == 'B';

returns this in the Dynamic LINQ writer/visitor:

LastName[0] == 65 || LastName[0] == 66

It should return (after #74 ):

LastName[0] in ('A', 'B')