diff --git a/src/EFCore.Relational/Query/Sql/DefaultQuerySqlGenerator.cs b/src/EFCore.Relational/Query/Sql/DefaultQuerySqlGenerator.cs
index c4eb953356e..06ddaf18b42 100644
--- a/src/EFCore.Relational/Query/Sql/DefaultQuerySqlGenerator.cs
+++ b/src/EFCore.Relational/Query/Sql/DefaultQuerySqlGenerator.cs
@@ -152,11 +152,6 @@ public virtual IRelationalValueBufferFactory CreateValueBufferFactory(
///
protected virtual IRelationalCommandBuilder Sql => _relationalCommandBuilder;
- ///
- /// The default string concatenation operator SQL.
- ///
- protected virtual string ConcatOperator => "+";
-
///
/// The default true literal SQL.
///
@@ -1506,8 +1501,6 @@ protected virtual string GenerateOperator([NotNull] Expression expression)
{
switch (expression.NodeType)
{
- case ExpressionType.Add:
- return expression.Type == typeof(string) ? " " + ConcatOperator + " " : " + ";
case ExpressionType.Extension:
{
var asStringCompareExpression = expression as StringCompareExpression;
diff --git a/src/EFCore.Sqlite.Core/Query/Sql/Internal/SqliteQuerySqlGenerator.cs b/src/EFCore.Sqlite.Core/Query/Sql/Internal/SqliteQuerySqlGenerator.cs
index 7fbd214b0d9..b7e1de8961a 100644
--- a/src/EFCore.Sqlite.Core/Query/Sql/Internal/SqliteQuerySqlGenerator.cs
+++ b/src/EFCore.Sqlite.Core/Query/Sql/Internal/SqliteQuerySqlGenerator.cs
@@ -15,8 +15,6 @@ namespace Microsoft.EntityFrameworkCore.Query.Sql.Internal
///
public class SqliteQuerySqlGenerator : DefaultQuerySqlGenerator
{
- protected override string ConcatOperator => "||";
-
///
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
@@ -28,6 +26,15 @@ public SqliteQuerySqlGenerator(
{
}
+ ///
+ /// This API supports the Entity Framework Core infrastructure and is not intended to be used
+ /// directly from your code. This API may change or be removed in future releases.
+ ///
+ protected override string GenerateOperator([NotNull] Expression expression)
+ => expression.NodeType == ExpressionType.Add && expression.Type == typeof(string)
+ ? " || "
+ : base.GenerateOperator(expression);
+
///
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.