diff --git a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs index af27324bb63..cb596b6bada 100644 --- a/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs +++ b/src/EFCore.Relational/Storage/RelationalSqlGenerationHelper.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using System.Text; using JetBrains.Annotations; @@ -57,7 +58,7 @@ public RelationalSqlGenerationHelper([NotNull] RelationalSqlGenerationHelperDepe /// A valid name based on the candidate name. /// public virtual string GenerateParameterName(string name) - => name.StartsWith("@") + => name.StartsWith("@", StringComparison.Ordinal) ? name : "@" + name;