No.
In the Entity Framework, it should be possible to see everything that is being done.
So, if you just did something like this:
queryable.Where(f => DelegateFunc(f));
If the definition of DelegateFunc is as follows:
public bool DelegateFunc(Foo foo)
{
return foo.Id > 4;
}
Entity Framework has no way to look inside the delegate, hack it and convert it to SQL.
All is not lost.
.., - :
public Expression<Func<Foo, bool>> DelegateExpression{
get{
Expression<Func<Foo,bool>> expr = f => f.Id > 4;
return expr;
}
}
queryable.Where(DelegateExpression);