I need a way to recreate dynamically generated reports at some point in the future. Long story short, I need to store a specific linq query (different for each report) into database and then execute the query with dynamic Linq later on.
This is all good, but I can't find a way to convert expression to string.
As in:
Expression<Product, bool> exp = (x) => (x.Id > 5 && x.Warranty != false);
should become:
"Product.Id > 5 && Product.Warranty != false"
Is there a way to do that?
Expression<Func<Product,bool>>
, I have modified your question. – AssumptiveToString()
? – Countable