Type[] exprArgTypes = { query.ElementType };
exprArgTypes are type parameters
IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate).
As you can see, it has only one type parameter - TSource , which is Purchase . In fact, you made a call to the Where method with two type parameters, as shown below:
IQueryable<Purchase> Where<Purchase, bool>(this IQueryable<Purchase> source, Expression<Func<Purchase, bool>> predicate)
As soon as both of these corrections are in expression, they run without problems.
source share