Bug #117251 Required property IHistoryRepository.LockReleaseBehavior adding in EF Core 9 missing from MySQLHistoryRepository.
Submitted: 20 Jan 18:48 Modified: 21 Jan 16:02
Reporter: Andrew Collard Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:9.0.0-preview+MySQL9.1.0 OS:Any
Assigned to: Filipe Silva CPU Architecture:Any

[20 Jan 18:48] Andrew Collard
Description:
MySql.EntityFrameworkCore (9.0.0-preview+MySQL9.1.0) cannot be used with the released version of .Net 9 EntityFramework (9.0.0). Breaking changes to the IHistoryRepository are missing. The changes were introduced in this commit. https://github.com/dotnet/efcore/commit/972a50aed052de667463b2eb260d875171455cfc#diff-bee0...

How to repeat:
1. Create a new project targeting .Net 9.
2. Add the latest MySql.EntityFrameworkCore (9.0.0-preview+MySQL9.1.0) and Microsoft.EntityFrameworkCore (9.0.1) nuget packages.
3. Create a simple entity, generate a migration, and attempt to run the migration  against a DB. The execution should fail with a TypeLoadException stating that the get_LockReleaseBehavior is missing.

Suggested fix:
A new version of MySql.EntityFrameworkCore targeting .Net 9 is required that implements the breaking changes included in EF Core 9.
[21 Jan 12:08] Filipe Silva
Hi Andrew,

Thank you for your interest in Connector/NET.

Please retry with the latest MySql.EntityFrameworkCore 9.0.0+MySQL9.2.0 (https://www.nuget.org/packages/MySql.EntityFrameworkCore/9.0.0).
[21 Jan 14:08] Andrew Collard
MySql.EntityFrameworkCore 9.0.0+MySQL9.2.0 (https://www.nuget.org/packages/MySql.EntityFrameworkCore/9.0.0) fixes the issue. We can now use MySQL.EntityFrameworkCore with .Net 9.0 EF libraries.

Thank you for the quick turn around.
[21 Jan 16:02] Filipe Silva
I'm glad it's sorted out.

Best regards,