I am trying to create Contains clause to existing Func properties lists, but I don't know how to attach it to previously passed properties list.
public static List<Func<T, bool>> GetPropertyWhereClauses<T>(List<Func<T, object>> properties, string queryPhrase)
{
var whereClauses = new List<Func<T, bool>>();
foreach (var property in properties)
{
/// how to add Contains to existing property Func<T, object> ?
whereClauses.Add(property.Contains(queryPhrase));
}
return whereClauses;
}
How to add that? I tried to use some Expression.Call but it doesn't take Func as parameter.