This won't work, but should give you an idea of what I'm trying to acheive:
public static IEnumerable<T> MyMethod<T>(this IEnumerable<T> entity,
string param, string SomeProp)
{
return entity.Where(l =>
System.Data.Objects.SqlClient.SqlFunctions.PatIndex(param, l.SomeProp) > 0);
}
Do I have to pass the entire Where() parameter as a function to MyMethod?