I am working on a project that uses Albahari's PredicateBuilder library http://www.albahari.com/nutshell/ to create a linq expression dynamically at run time. I would like to find a way to translate this dynamically created linq predicate of type Expression<Func<T, bool>> into a readable english statement at runtime.
I'll give a statically created linq statement as an example:
from p in Purchases
select p
where p.Price > 100 && p.Description != "Bike".
For this linq statement I would want to dynamically generate at runtime an english description along the lines of:
"You are searching for purchases where the price is greater than 100 and the description is not bike".
Are there any libraries that already exist which accomplish this goal, keep in mind I am using PredicateBuilder to dynamically generate the where predicate. If no solution exists how would you go about building a solution?
Thanks!