diff --git a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs index d0b7545bee3..ea465b83469 100644 --- a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs +++ b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs @@ -810,7 +810,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(decimal)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(decimal)), source, cancellationToken); } /// @@ -836,7 +836,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(decimal?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(decimal?)), source, cancellationToken); } /// @@ -866,7 +866,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(decimal)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(decimal)), source, selector, cancellationToken); } /// @@ -896,7 +896,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(decimal?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(decimal?)), source, selector, cancellationToken); } /// @@ -922,7 +922,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(int)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(int)), source, cancellationToken); } /// @@ -948,7 +948,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(int?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(int?)), source, cancellationToken); } /// @@ -978,7 +978,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(int)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(int)), source, selector, cancellationToken); } /// @@ -1008,7 +1008,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(int?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(int?)), source, selector, cancellationToken); } /// @@ -1034,7 +1034,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(long)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(long)), source, cancellationToken); } /// @@ -1060,7 +1060,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(long?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(long?)), source, cancellationToken); } /// @@ -1090,7 +1090,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(long)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(long)), source, selector, cancellationToken); } /// @@ -1120,7 +1120,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(long?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(long?)), source, selector, cancellationToken); } /// @@ -1146,7 +1146,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(double)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(double)), source, cancellationToken); } /// @@ -1172,7 +1172,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(double?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(double?)), source, cancellationToken); } /// @@ -1202,7 +1202,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(double)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(double)), source, selector, cancellationToken); } /// @@ -1232,7 +1232,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(double?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(double?)), source, selector, cancellationToken); } /// @@ -1258,7 +1258,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(float)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(float)), source, cancellationToken); } /// @@ -1284,7 +1284,7 @@ public static Task SumAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.SumWithoutSelectorMethods[typeof(float?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithoutSelector(typeof(float?)), source, cancellationToken); } /// @@ -1314,7 +1314,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(float)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(float)), source, selector, cancellationToken); } /// @@ -1344,7 +1344,7 @@ public static Task SumAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.SumWithSelectorMethods[typeof(float?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetSumWithSelector(typeof(float?)), source, selector, cancellationToken); } #endregion @@ -1374,7 +1374,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(decimal)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(decimal)), source, cancellationToken); } /// @@ -1400,7 +1400,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(decimal?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(decimal?)), source, cancellationToken); } /// @@ -1431,7 +1431,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(decimal)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(decimal)), source, selector, cancellationToken); } /// @@ -1462,7 +1462,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(decimal?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(decimal?)), source, selector, cancellationToken); } /// @@ -1488,7 +1488,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(int)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(int)), source, cancellationToken); } /// @@ -1514,7 +1514,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(int?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(int?)), source, cancellationToken); } /// @@ -1545,7 +1545,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(int)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(int)), source, selector, cancellationToken); } /// @@ -1576,7 +1576,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(int?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(int?)), source, selector, cancellationToken); } /// @@ -1602,7 +1602,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(long)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(long)), source, cancellationToken); } /// @@ -1628,7 +1628,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(long?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(long?)), source, cancellationToken); } /// @@ -1659,7 +1659,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(long)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(long)), source, selector, cancellationToken); } /// @@ -1690,7 +1690,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(long?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(long?)), source, selector, cancellationToken); } /// @@ -1716,7 +1716,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(double)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(double)), source, cancellationToken); } /// @@ -1742,7 +1742,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(double?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(double?)), source, cancellationToken); } /// @@ -1773,7 +1773,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(double)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(double)), source, selector, cancellationToken); } /// @@ -1804,7 +1804,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(double?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(double?)), source, selector, cancellationToken); } /// @@ -1830,7 +1830,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(float)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(float)), source, cancellationToken); } /// @@ -1856,7 +1856,7 @@ public static Task AverageAsync( { Check.NotNull(source, nameof(source)); - return ExecuteAsync>(QueryableMethods.AverageWithoutSelectorMethods[typeof(float?)], source, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithoutSelector(typeof(float?)), source, cancellationToken); } /// @@ -1887,7 +1887,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(float)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(float)), source, selector, cancellationToken); } /// @@ -1918,7 +1918,7 @@ public static Task AverageAsync( Check.NotNull(source, nameof(source)); Check.NotNull(selector, nameof(selector)); - return ExecuteAsync>(QueryableMethods.AverageWithSelectorMethods[typeof(float?)], source, selector, cancellationToken); + return ExecuteAsync>(QueryableMethods.GetAverageWithSelector(typeof(float?)), source, selector, cancellationToken); } #endregion diff --git a/src/EFCore/Query/QueryableMethods.cs b/src/EFCore/Query/QueryableMethods.cs index a2d49da0060..75e9e2bdefd 100644 --- a/src/EFCore/Query/QueryableMethods.cs +++ b/src/EFCore/Query/QueryableMethods.cs @@ -86,10 +86,15 @@ public static bool IsAverageWithSelector(MethodInfo methodInfo) => methodInfo.IsGenericMethod && AverageWithSelectorMethods.Values.Contains(methodInfo.GetGenericMethodDefinition()); - public static IReadOnlyDictionary SumWithoutSelectorMethods { get; } - public static IReadOnlyDictionary SumWithSelectorMethods { get; } - public static IReadOnlyDictionary AverageWithoutSelectorMethods { get; } - public static IReadOnlyDictionary AverageWithSelectorMethods { get; } + public static MethodInfo GetSumWithoutSelector(Type type) => SumWithoutSelectorMethods[type]; + public static MethodInfo GetSumWithSelector(Type type) => SumWithSelectorMethods[type]; + public static MethodInfo GetAverageWithoutSelector(Type type) => AverageWithoutSelectorMethods[type]; + public static MethodInfo GetAverageWithSelector(Type type) => AverageWithSelectorMethods[type]; + + private static Dictionary SumWithoutSelectorMethods { get; } + private static Dictionary SumWithSelectorMethods { get; } + private static Dictionary AverageWithoutSelectorMethods { get; } + private static Dictionary AverageWithSelectorMethods { get; } private static bool IsExpressionOfFunc(Type type, int funcGenericArgs = 2) => type.IsGenericType @@ -239,61 +244,61 @@ MethodInfo GetSumOrAverageWithSelector(string methodName) && mi.GetParameters().Length == 2 && HasSelector(mi.GetParameters()[1].ParameterType)); - SumWithoutSelectorMethods = new ReadOnlyDictionary(new Dictionary + SumWithoutSelectorMethods = new Dictionary { - { typeof(decimal), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(long), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(int), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(double), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(float), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(decimal), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(long), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(int), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(double), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(float), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, { typeof(decimal?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(long?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(int?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(double?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, - { typeof(float?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) } - }); + { typeof(long?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(int?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(double?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) }, + { typeof(float?), GetSumOrAverageWithoutSelector(nameof(Queryable.Sum)) } + }; - SumWithSelectorMethods = new ReadOnlyDictionary(new Dictionary + SumWithSelectorMethods = new Dictionary { - { typeof(decimal), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(long), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(int), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(double), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(float), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(decimal), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(long), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(int), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(double), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(float), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, { typeof(decimal?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(long?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(int?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(double?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, - { typeof(float?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) } - }); + { typeof(long?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(int?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(double?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) }, + { typeof(float?), GetSumOrAverageWithSelector(nameof(Queryable.Sum)) } + }; - AverageWithoutSelectorMethods = new ReadOnlyDictionary(new Dictionary + AverageWithoutSelectorMethods = new Dictionary { - { typeof(decimal), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(long), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(int), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(double), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(float), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(decimal), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(long), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(int), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(double), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(float), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, { typeof(decimal?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(long?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(int?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(double?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, - { typeof(float?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) } - }); + { typeof(long?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(int?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(double?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) }, + { typeof(float?), GetSumOrAverageWithoutSelector(nameof(Queryable.Average)) } + }; - AverageWithSelectorMethods = new ReadOnlyDictionary(new Dictionary + AverageWithSelectorMethods = new Dictionary { - { typeof(decimal), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(long), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(int), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(double), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(float), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(decimal), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(long), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(int), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(double), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(float), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, { typeof(decimal?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(long?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(int?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(double?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, - { typeof(float?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) } - }); + { typeof(long?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(int?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(double?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) }, + { typeof(float?), GetSumOrAverageWithSelector(nameof(Queryable.Average)) } + }; } } }