diff --git a/Directory.Build.props b/Directory.Build.props
index 1f44703b7..5d3d82f42 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -26,12 +26,12 @@
- net8.0
- net9.0
- net8.0
- net9.0
- net8.0
- net8.0
+ net10.0
+ net10.0
+ net10.0
+ net10.0
+ net10.0
+ net10.0
diff --git a/Directory.Packages.props b/Directory.Packages.props
index c4e17801f..77ad2c4e9 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,60 +1,56 @@
-
- [9.0.0,9.0.999]
+ [10.0.0,10.0.999]
-
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Version.props b/Version.props
index 90e3fc0d5..7e722077b 100644
--- a/Version.props
+++ b/Version.props
@@ -10,19 +10,19 @@
We also used alpha/beta/silver release types in the past, but they mix poorly with the ones above when orderend according to SemVer2
rules.
-->
- 9.0.1
+ 10.0.1
servicing
1
-
+
diff --git a/dotnet-tools.json b/dotnet-tools.json
index 305bdb11d..530896d9c 100644
--- a/dotnet-tools.json
+++ b/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
- "version": "9.0.0",
+ "version": "10.0.0",
"commands": [
"dotnet-ef"
]
diff --git a/global.json b/global.json
index db8627a23..7ca72cbbf 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "9.0.100",
+ "version": "10.0.100",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
diff --git a/src/EFCore.MySql/Extensions/MySqlDbContextOptionsBuilderExtensions.cs b/src/EFCore.MySql/Extensions/MySqlDbContextOptionsBuilderExtensions.cs
index d19312176..b98a41202 100644
--- a/src/EFCore.MySql/Extensions/MySqlDbContextOptionsBuilderExtensions.cs
+++ b/src/EFCore.MySql/Extensions/MySqlDbContextOptionsBuilderExtensions.cs
@@ -62,7 +62,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);
var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
- .TranslateParameterizedCollectionsToConstants();
+ .UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);
@@ -108,7 +108,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);
var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
- .TranslateParameterizedCollectionsToConstants();
+ .UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);
@@ -158,7 +158,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);
var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
- .TranslateParameterizedCollectionsToConstants();
+ .UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);
@@ -205,7 +205,7 @@ public static DbContextOptionsBuilder UseMySql(
ConfigureWarnings(optionsBuilder);
var mySqlDbContextOptionsBuilder = new MySqlDbContextOptionsBuilder(optionsBuilder)
- .TranslateParameterizedCollectionsToConstants();
+ .UseParameterizedCollectionMode(ParameterTranslationMode.Constant);
mySqlOptionsAction?.Invoke(mySqlDbContextOptionsBuilder);
diff --git a/src/EFCore.MySql/Query/ExpressionTranslators/Internal/MySqlStringComparisonMethodTranslator.cs b/src/EFCore.MySql/Query/ExpressionTranslators/Internal/MySqlStringComparisonMethodTranslator.cs
index 346a7f5f0..c02132870 100644
--- a/src/EFCore.MySql/Query/ExpressionTranslators/Internal/MySqlStringComparisonMethodTranslator.cs
+++ b/src/EFCore.MySql/Query/ExpressionTranslators/Internal/MySqlStringComparisonMethodTranslator.cs
@@ -525,7 +525,7 @@ protected virtual SqlExpression GetLikeExpressionUsingParameter(
StartsEndsWithContains methodType)
{
if (pattern is SqlParameterExpression patternParameter &&
- patternParameter.Name.StartsWith(QueryCompilationContext.QueryParameterPrefix, StringComparison.Ordinal))
+ patternParameter.Name.StartsWith("__", StringComparison.Ordinal))
{
// The pattern is a parameter, register a runtime parameter that will contain the rewritten LIKE pattern, where
// all special characters have been escaped.
@@ -718,7 +718,7 @@ private static string ConstructLikePatternParameter(
QueryContext queryContext,
string baseParameterName,
StartsEndsWithContains methodType)
- => queryContext.ParameterValues[baseParameterName] switch
+ => queryContext.Parameters[baseParameterName] switch
{
null => null,
diff --git a/src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlBoolOptimizingExpressionVisitor.cs b/src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlBoolOptimizingExpressionVisitor.cs
index d3a08bd9e..71e643208 100644
--- a/src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlBoolOptimizingExpressionVisitor.cs
+++ b/src/EFCore.MySql/Query/ExpressionVisitors/Internal/MySqlBoolOptimizingExpressionVisitor.cs
@@ -541,6 +541,20 @@ protected override Expression VisitLeftJoin(LeftJoinExpression leftJoinExpressio
return leftJoinExpression.Update(table, joinPredicate);
}
+ protected override Expression VisitRightJoin(RightJoinExpression rightJoinExpression)
+ {
+ Check.NotNull(rightJoinExpression, nameof(rightJoinExpression));
+
+ var parentOptimize = _optimize;
+ _optimize = false;
+ var table = (TableExpressionBase)Visit(rightJoinExpression.Table);
+ _optimize = true;
+ var joinPredicate = (SqlExpression)Visit(rightJoinExpression.JoinPredicate);
+ _optimize = parentOptimize;
+
+ return rightJoinExpression.Update(table, joinPredicate);
+ }
+
protected override Expression VisitRowValue(RowValueExpression rowValueExpression)
{
var parentOptimize = _optimize;
diff --git a/src/EFCore.MySql/Query/Internal/MySqlParameterBasedSqlProcessor.cs b/src/EFCore.MySql/Query/Internal/MySqlParameterBasedSqlProcessor.cs
index 4111be0d1..15588cea8 100644
--- a/src/EFCore.MySql/Query/Internal/MySqlParameterBasedSqlProcessor.cs
+++ b/src/EFCore.MySql/Query/Internal/MySqlParameterBasedSqlProcessor.cs
@@ -1,8 +1,9 @@
-// Copyright (c) Pomelo Foundation. All rights reserved.
+// Copyright (c) Pomelo Foundation. All rights reserved.
// Licensed under the MIT. See LICENSE in the project root for license information.
#nullable enable
+using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore.Query;
@@ -25,6 +26,7 @@ public MySqlParameterBasedSqlProcessor(
_options = options;
}
+ [Obsolete]
public override Expression Optimize(
Expression queryExpression,
IReadOnlyDictionary parametersValues,
@@ -58,20 +60,5 @@ public override Expression Optimize(
return queryExpression;
}
-
- ///
- protected override Expression ProcessSqlNullability(
- Expression queryExpression,
- IReadOnlyDictionary parametersValues,
- out bool canCache)
- {
- Check.NotNull(queryExpression, nameof(queryExpression));
- Check.NotNull(parametersValues, nameof(parametersValues));
-
- queryExpression = new MySqlSqlNullabilityProcessor(Dependencies, Parameters)
- .Process(queryExpression, parametersValues, out canCache);
-
- return queryExpression;
- }
}
}
diff --git a/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContext.cs b/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContext.cs
index f22945f5a..bddb98525 100644
--- a/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContext.cs
+++ b/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContext.cs
@@ -21,9 +21,8 @@ public MySqlQueryCompilationContext(
[NotNull] QueryCompilationContextDependencies dependencies,
[NotNull] RelationalQueryCompilationContextDependencies relationalDependencies,
bool async,
- bool precompiling,
- IReadOnlySet nonNullableReferenceTypeParameters)
- : base(dependencies, relationalDependencies, async, precompiling, nonNullableReferenceTypeParameters)
+ bool precompiling)
+ : base(dependencies, relationalDependencies, async, precompiling)
{
}
diff --git a/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContextFactory.cs b/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContextFactory.cs
index 1b61b17f7..cfb90e879 100644
--- a/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContextFactory.cs
+++ b/src/EFCore.MySql/Query/Internal/MySqlQueryCompilationContextFactory.cs
@@ -27,8 +27,8 @@ public MySqlQueryCompilationContextFactory(
public virtual QueryCompilationContext Create(bool async)
=> new MySqlQueryCompilationContext(_dependencies, _relationalDependencies, async);
- public virtual QueryCompilationContext CreatePrecompiled(bool async, IReadOnlySet nonNullableReferenceTypeParameters)
+ public virtual QueryCompilationContext CreatePrecompiled(bool async)
=> new MySqlQueryCompilationContext(
- _dependencies, _relationalDependencies, async, precompiling: true, nonNullableReferenceTypeParameters);
+ _dependencies, _relationalDependencies, async, true);
}
}
diff --git a/src/EFCore.MySql/Query/Internal/MySqlQueryableMethodTranslatingExpressionVisitor.cs b/src/EFCore.MySql/Query/Internal/MySqlQueryableMethodTranslatingExpressionVisitor.cs
index 789df5247..22f6528ea 100644
--- a/src/EFCore.MySql/Query/Internal/MySqlQueryableMethodTranslatingExpressionVisitor.cs
+++ b/src/EFCore.MySql/Query/Internal/MySqlQueryableMethodTranslatingExpressionVisitor.cs
@@ -80,6 +80,7 @@ bool IsJsonEachKeyColumn(SelectExpression selectExpression, ColumnExpression ord
&& IsJsonEachKeyColumn(subquery, projectedColumn)));
}
+ [Obsolete]
protected override bool IsValidSelectExpressionForExecuteDelete(
SelectExpression selectExpression,
StructuralTypeShaperExpression shaper,
diff --git a/src/Shared/Check.cs b/src/Shared/Check.cs
index 9e460f141..fe5fb1571 100644
--- a/src/Shared/Check.cs
+++ b/src/Shared/Check.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Pomelo Foundation. All rights reserved.
+// Copyright (c) Pomelo Foundation. All rights reserved.
// Licensed under the MIT. See LICENSE in the project root for license information.
using System;
@@ -38,7 +38,7 @@ public static IReadOnlyList NotEmpty(IReadOnlyList value, [InvokerParam
{
NotEmpty(parameterName, nameof(parameterName));
- throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(parameterName));
+ throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty);
}
return value;
@@ -54,7 +54,7 @@ public static string NotEmpty(string value, [InvokerParameterName] [NotNull] str
}
else if (value.Trim().Length == 0)
{
- e = new ArgumentException(AbstractionsStrings.ArgumentIsEmpty(parameterName));
+ e = new ArgumentException(AbstractionsStrings.ArgumentIsEmpty);
}
if (e != null)
@@ -74,7 +74,7 @@ public static string NullButNotEmpty(string value, [InvokerParameterName] [NotNu
{
NotEmpty(parameterName, nameof(parameterName));
- throw new ArgumentException(AbstractionsStrings.ArgumentIsEmpty(parameterName));
+ throw new ArgumentException(AbstractionsStrings.ArgumentIsEmpty);
}
return value;
@@ -105,7 +105,7 @@ public static IReadOnlyList HasNoEmptyElements(
{
NotEmpty(parameterName, nameof(parameterName));
- throw new ArgumentException(AbstractionsStrings.CollectionArgumentHasEmptyElements(parameterName));
+ throw new ArgumentException(AbstractionsStrings.CollectionArgumentHasEmptyElements);
}
return value;