This is probably a stupid question, but here. I would like to be able to dynamically build a <T> predicate from a row processed from a VARCHAR database column, or any row, for that matter. For example, let's say that the column in the database contains the following row:
return e.SomeStringProperty.Contains("foo");
These code / line values will be stored in the database, knowing what are the possible properties of the common "e", and knowing that they need to return a boolean value. Then, in a magical, beautiful, fantastic world, the code could be executed without knowing what a predicate is, for example:
string predicateCode = GetCodeFromDatabase();
var allItems = new List<SomeObject>{....};
var filteredItems = allItems.FindAll(delegate(SomeObject e) { predicateCode });
or giardiasis:
var filteredItems = allItems.FindAll(e => [predicateCode]);
, , , , , , Reflection.Emit, FindAll <T> ( /)?