I would like to know if an IQueryable object's Expression contains a certain "Where clause".
For example, given as IQueryable instance, which could be something like:
var query = customers.Where(c => c.Name == "Test");
How can I determine if the query is filtering the customers by Name?
You have to walk the expression tree (IQueryable.Expression), if you are on .NET4 ExpressionVisitor class helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With