diff --git a/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs b/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs index 2f8d90c5365..265aa35361b 100644 --- a/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs +++ b/src/EFCore.SqlServer/Query/ExpressionTranslators/Internal/SqlServerMathTranslator.cs @@ -56,9 +56,19 @@ public class SqlServerMathTranslator : IMethodCallTranslator { typeof(Math).GetRuntimeMethod(nameof(Math.Sign), new[] { typeof(short) }), "SIGN" } }; - private static readonly IEnumerable _truncateMethodInfos = new[] { typeof(Math).GetRuntimeMethod(nameof(Math.Truncate), new[] { typeof(decimal) }), typeof(Math).GetRuntimeMethod(nameof(Math.Truncate), new[] { typeof(double) }) }; + private static readonly IEnumerable _truncateMethodInfos = new[] + { + typeof(Math).GetRuntimeMethod(nameof(Math.Truncate), new[] { typeof(decimal) }), + typeof(Math).GetRuntimeMethod(nameof(Math.Truncate), new[] { typeof(double) }) + }; - private static readonly IEnumerable _roundMethodInfos = new[] { typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(decimal) }), typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(double) }), typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(decimal), typeof(int) }), typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(double), typeof(int) }) }; + private static readonly IEnumerable _roundMethodInfos = new[] + { + typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(decimal) }), + typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(double) }), + typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(decimal), typeof(int) }), + typeof(Math).GetRuntimeMethod(nameof(Math.Round), new[] { typeof(double), typeof(int) }) + }; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to