I have this property in a class
public Expression<Func<T, string, bool>> FilterExp { get; set; }
I need to replace the string paramater with a value that is known at runtime and covert in into this:
Expression<Func<T, bool>>
so I can use it with IQueryable.
This is what it looks like when I set the filter:
PagingProvider<Employee> provider = new PagingProvider<Employee>(context.Employees);
provider.FilterExp = (employee, filterText) => employee.FullName.Contains(filterText);
return provider.GetResults();
What would be the best way of changing the expression?