Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
Expand all | Collapse all

[.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

  • 1.  [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon November 18, 2024 08:56 AM

    Hello,

    currently the IBM.EntityFrameworkCore libary version 8.0.0.300 doesn't support EF Core Version 9. 

    The following exception occurs:

    System.TypeLoadException : Method 'get_LockReleaseBehavior' in type 'IBM.EntityFrameworkCore.Migrations.Internal.Db2HistoryRepository' from assembly 'IBM.EntityFrameworkCore, Version=8.0.0.300, Culture=neutral, PublicKeyToken=7c307b91aa13d208' does not have an implementation.

    Downgrading to EF Core Version 8 fixes this issue.

    Please update IBM.EntityFrameworkCore to support EF Core Version 9.

    Thanks.



    ------------------------------
    Michael Volz
    ------------------------------


  • 2.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Thu December 05, 2024 12:23 AM

    Hello @Hosathota Vishwanatha, could you please take a look at this?



    ------------------------------
    Michael Volz
    ------------------------------



  • 3.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Fri December 06, 2024 02:27 PM

    Hello @Michael Volz. I have the same error but with EF Core version 8.0.0. You can help me?

    in my project install a nuget:

    and in console i try to scaffold this return



    ------------------------------
    Michele Melchionna
    ------------------------------



  • 4.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Thu December 12, 2024 01:06 AM

    Hello @Michele Melchionna,

    this shouldn't happen with EF Core 8.

    Please make sure that no project in your solution references anything related to EF Core 9.



    ------------------------------
    Michael Volz
    ------------------------------



  • 5.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon December 16, 2024 05:16 AM

    Thanks @Michael Volz

    You know using scaffold with EF core? 

    My script is start but no response  from AS400. 

    Do you know if i need to install something on the as400? 

    Thanks. 



    ------------------------------
    Michele Melchionna
    ------------------------------



  • 6.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon December 16, 2024 05:20 AM

    We have used scaffolding before and it worked perfectly fine with EF Core 8.

    No need to install anythin on another machine.

    As I said: Are you sure that nothing in your solution references EF Core 9?



    ------------------------------
    Michael Volz
    ------------------------------



  • 7.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon December 16, 2024 06:25 AM

    yes, in solution not install EF Core 9 because when start script it waits for something and in console AS400 result connection open but not working. 



    ------------------------------
    Michele Melchionna
    ------------------------------



  • 8.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon December 16, 2024 06:52 AM

    Sorry I don't understand you.

    The attribute LockReleaseBehavior was added first in EF Core 9.

    So there's no way that your current code doesn't use code from .NET 9.

    Please check all your direct and transient dependencies for EF Core 9 and downgrade them to EF Core 8.

    EF Core 8.0 https://github.com/dotnet/efcore/blob/5d020e763f00511c102f94fdf5bf525512d7daaf/src/EFCore.Relational/Migrations/HistoryRepository.cs --> No LockReleaseBehavior 

    EF Coure 9.0 https://github.com/dotnet/efcore/blob/645f3131a5b0a4bf677201cf22773990a5316c89/src/EFCore.Relational/Migrations/HistoryRepository.cs#L56



    ------------------------------
    Michael Volz
    ------------------------------



  • 9.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Mon December 16, 2024 07:45 AM

    sorry, the problem with lockreleasebehavior is roselved. this problem scaffold another problem 



    ------------------------------
    Michele Melchionna
    ------------------------------



  • 10.  RE: [.NET] IBM.EntityFrameworkCore doesn't support EF Core 9

    Posted Fri December 06, 2024 02:27 PM

    Hello @Michael Volz. Hi have same problem, but with EF Core 8.0.0. 

    Can you help me with fix it? 



    ------------------------------
    Michele Melchionna
    ------------------------------