Skip to content

Commit bba4911

Browse files
committed
WL#16900 [Add support for .NET 10 and EF Core 10 preview versions]
Change-Id: I88fe42227d9485f632706060b0ab2f2329f19550
1 parent 4ca9c60 commit bba4911

28 files changed

+93
-42
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Fixed bug OpenAsync throws unhandled exception from thread pool (MySQL Bug #110789, Oracle Bug #35474099).
33
- Fixed Entity Framework 6 from NET9 is deprecated due to Nunit4 Upgrade (MySQL Bug #117976, Oracle Bug #37837374).
44
- Added support for GSSAPI/Kerberos authentication on Windows using authentication_ldap_sasl_client plug-in (WL15984).
5+
- Added support for .NET 10 and EF Core 10 preview versions (WL16900).
56

67

78
9.3.0

EFCore/src/Migrations/Internal/MySQLHistoryRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public MySQLHistoryRepository([NotNull] HistoryRepositoryDependencies dependenci
5353
: base(dependencies)
5454
{
5555
}
56-
#if NET9_0
56+
#if NET9_0_OR_GREATER
5757
public override LockReleaseBehavior LockReleaseBehavior => LockReleaseBehavior.Connection;
5858

5959
public override IMigrationsDatabaseLock AcquireDatabaseLock()

EFCore/src/Migrations/Internal/MySQLMigrationDatabaseLockcs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
namespace MySql.EntityFrameworkCore.Migrations.Internal
3535
{
36-
#if NET9_0
36+
#if NET9_0_OR_GREATER
3737
internal class MySQLMigrationDatabaseLock(
3838
IRelationalCommand releaseLockCommand,
3939
RelationalCommandParameterObject relationalCommandParameters,

EFCore/src/Migrations/Internal/MySQLMigrationsModelDiffer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected override IEnumerable<MigrationOperation> Add(IColumn target, DiffConte
7979
return base.Add(target, diffContext, inline);
8080
}
8181

82-
#elif NET9_0
82+
#elif NET9_0_OR_GREATER
8383
public MySQLMigrationsModelDiffer(
8484
[NotNull] IRelationalTypeMappingSource typeMappingSource,
8585
[NotNull] IMigrationsAnnotationProvider migrationsAnnotations,

EFCore/src/Migrations/Internal/MySQLMigrator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
namespace MySql.EntityFrameworkCore.Migrations.Internal
4949
{
50-
#if NET9_0
50+
#if NET9_0_OR_GREATER
5151
public class MySQLMigrator : IMigrator
5252
{
5353
private readonly IMigrationsAssembly _migrationsAssembly;

EFCore/src/MySql.EntityFrameworkCore.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</PropertyGroup>
2424

2525
<PropertyGroup Condition="'$(allow_prerelease)'=='true'">
26-
<!--<TargetFrameworks>net9.0;$(TargetFrameworks)</TargetFrameworks>-->
26+
<TargetFrameworks>$(TargetFrameworks);net10.0</TargetFrameworks>
2727
</PropertyGroup>
2828

2929
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
@@ -36,6 +36,11 @@
3636
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.3" />
3737
</ItemGroup>
3838

39+
<ItemGroup Condition="'$(TargetFramework)'=='net10.0'">
40+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0-preview.5.25277.114" />
41+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.0-preview.5.25277.114" />
42+
</ItemGroup>
43+
3944
<ItemGroup>
4045
<ProjectReference Include="..\..\MySQL.Data\src\MySql.Data.csproj" />
4146
</ItemGroup>

EFCore/src/Properties/VersionInfo.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
[assembly: NeutralResourcesLanguage("en-US")]
4848
#elif NET9_0
4949
[assembly: AssemblyVersion("9.4.0")]
50-
[assembly: AssemblyInformationalVersion("9.0.0.0-preview+MySQL9.4.0")]
50+
[assembly: AssemblyInformationalVersion("9.0.3.0+MySQL9.4.0")]
51+
[assembly: AssemblyFileVersion("9.4.0.0")]
52+
[assembly: NeutralResourcesLanguage("en-US")]
53+
#elif NET10_0
54+
[assembly: AssemblyVersion("9.4.0")]
55+
[assembly: AssemblyInformationalVersion("10.0.0.0-preview+MySQL9.4.0")]
5156
[assembly: AssemblyFileVersion("9.4.0.0")]
5257
[assembly: NeutralResourcesLanguage("en-US")]
5358
#endif

EFCore/src/Query/Expressions/Internal/MySQLBinaryExpression.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public MySQLBinaryExpression(
6161
Right = right;
6262
}
6363

64-
#if NET9_0
64+
#if NET9_0_OR_GREATER
6565
private static ConstructorInfo? _quotingConstructor;
6666
#endif
6767
public virtual MySQLBinaryExpressionOperatorType OperatorType { get; }
@@ -81,7 +81,7 @@ protected override Expression VisitChildren(ExpressionVisitor visitor)
8181
return Update(left, right);
8282
}
8383

84-
#if NET9_0
84+
#if NET9_0_OR_GREATER
8585
/// <inheritdoc />
8686
public override Expression Quote() => New(
8787
_quotingConstructor ??= typeof(MySQLBinaryExpression).GetConstructor(

EFCore/src/Query/Expressions/Internal/MySQLCollateExpression.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ internal class MySQLCollateExpression : SqlExpression
4545
private readonly string _charset;
4646
private readonly string _collation;
4747

48-
#if NET9_0
48+
#if NET9_0_OR_GREATER
4949
private static ConstructorInfo? _quotingConstructor;
5050
#endif
5151

52-
#if NET9_0
52+
#if NET9_0_OR_GREATER
5353
public MySQLCollateExpression(SqlExpression operand, string collation)
5454
: base(operand.Type, operand.TypeMapping)
5555
{
@@ -81,7 +81,7 @@ public MySQLCollateExpression(
8181
/// </summary>
8282
public virtual string Charset => _charset;
8383

84-
#if NET9_0
84+
#if NET9_0_OR_GREATER
8585
/// <summary>
8686
/// The expression on which collation is applied.
8787
/// </summary>
@@ -126,7 +126,7 @@ protected override Expression VisitChildren(ExpressionVisitor visitor)
126126

127127
}
128128

129-
#if NET9_0
129+
#if NET9_0_OR_GREATER
130130
public virtual MySQLCollateExpression Update(SqlExpression operand)
131131
=> operand != Operand
132132
? new MySQLCollateExpression(operand, Collation)

EFCore/src/Query/Expressions/Internal/MySQLColumnAliasReferenceExpression.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace MySql.EntityFrameworkCore.Query.Expressions.Internal
4040
/// </summary>
4141
internal class MySQLColumnAliasReferenceExpression : SqlExpression, IEquatable<MySQLColumnAliasReferenceExpression>
4242
{
43-
#if NET9_0
43+
#if NET9_0_OR_GREATER
4444
private static ConstructorInfo? _quotingConstructor;
4545
#endif
4646

@@ -72,7 +72,7 @@ public virtual MySQLColumnAliasReferenceExpression Update(
7272
? this
7373
: new MySQLColumnAliasReferenceExpression(alias, expression, Type, TypeMapping!);
7474

75-
#if NET9_0
75+
#if NET9_0_OR_GREATER
7676
public override Expression Quote() => New(
7777
_quotingConstructor ??= typeof(MySQLColumnAliasReferenceExpression).GetConstructor([typeof(SqlExpression), typeof(string)])!,
7878
Constant(Alias),

0 commit comments

Comments
 (0)