|
public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull |
Methods having optional (default) argument values cannot appear in an expression tree, where these should presumably be usable. As a (vacuous) example:
dbContext.Owner.SelectMany(o => dbContext.Cats.CountBy(c => c.Age))
will not compile.
dotnet/efcore#33177
dotnet/efcore#32741