I am using PredicateBuilder to build an expression tree so I end up with an Expression(Of Func(T, Boolean))
.
I can't pass that Expression into a WHERE function like this:
invoices.Where(predicate)
Where predicate is an Expression(Of Func(Invoices, Boolean)).
The compile error I am getting is: Value of type: Expression(Of Func(Invoices, Boolean)) cannot be converted to System.Func(Invoices, Boolean)
How can I use the predicate build in WHERE functions?