Consider following lambda expression:
IQueryable<Product> query = query.Where(x => x.ProductName.Contains("P100"));
I need to convert above code something like this:
IQueryable<Product> query = query.Where(x => x.GetPropertyValue("ProductName").Contains("P100"));
Here I have added a dummy method GetPropertyValue("ProductName")
to explain the requirement.
In above code the property should be resolved in run-time. In other words I need to access the property from a sting value E.g "ProductName"
How can I do this?