diff --git a/src/EFCore.SqlServer/Query/Internal/Translators/SqlServerByteArrayMethodTranslator.cs b/src/EFCore.SqlServer/Query/Internal/Translators/SqlServerByteArrayMethodTranslator.cs index 210c35a5d18..eecf04c1218 100644 --- a/src/EFCore.SqlServer/Query/Internal/Translators/SqlServerByteArrayMethodTranslator.cs +++ b/src/EFCore.SqlServer/Query/Internal/Translators/SqlServerByteArrayMethodTranslator.cs @@ -53,9 +53,9 @@ public SqlServerByteArrayMethodTranslator(ISqlExpressionFactory sqlExpressionFac return _sqlExpressionFactory.GreaterThan( _sqlExpressionFactory.Function( "CHARINDEX", - new[] { value, source }, + [value, source], nullable: true, - argumentsPropagateNullability: new[] { true, true }, + argumentsPropagateNullability: [true, true], typeof(int)), _sqlExpressionFactory.Constant(0)); } @@ -67,9 +67,9 @@ public SqlServerByteArrayMethodTranslator(ISqlExpressionFactory sqlExpressionFac return _sqlExpressionFactory.Convert( _sqlExpressionFactory.Function( "SUBSTRING", - new[] { arguments[0], _sqlExpressionFactory.Constant(1), _sqlExpressionFactory.Constant(1) }, + [arguments[0], _sqlExpressionFactory.Constant(1), _sqlExpressionFactory.Constant(1)], nullable: true, - argumentsPropagateNullability: new[] { true, true, true }, + argumentsPropagateNullability: [true, true, true], typeof(byte[])), method.ReturnType); }