EFCore error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
techieRaja
Posts: 2
Joined: Wed 09 Oct 2019 21:04

EFCore error

Post by techieRaja » Wed 09 Oct 2019 21:35

This is my first time with Dot Connect for Oracle in .Net Core. All my experience so far has been with .Net Framework . I have dot connect for oracle version 9.8.838 installed on my machine.

In VS2019 16.3.3, I have a .Net Standard 2.1 library to which a devart Entity Framework Core model has been added, using the wizard.
This library has following nuget packages (and all related dependencies)-

"Devart.Data.Oracle.EFCore" Version="9.8.838"
"Microsoft.EntityFrameworkCore" Version="3.0.0"
"Microsoft.EntityFrameworkCore.Relational" Version="3.0.0"
"Microsoft.EntityFrameworkCore.Tools" Version="3.0.0"
"Microsoft.Extensions.Configuration.Json" Version="3.0.0"

On running a test (from a .Net Core 3.0 NUnit test library)to get data for an entity I am getting below exception -

System.TypeLoadException: 'Method 'get_Info' in type 'Devart.Data.Oracle.Entity.OracleOptionsExtension' from assembly 'Devart.Data.Oracle.Entity.EFCore, Version=9.8.838.0, Culture=neutral, PublicKeyToken=09af7300eec23701' does not have an implementation.'

Shalex
Site Admin
Posts: 8829
Joined: Thu 14 Aug 2008 12:44

Re: EFCore error

Post by Shalex » Thu 10 Oct 2019 15:58

EF Core 3 is currently not supported by dotConnect for Oracle. We will notify you when the new public build with this feature is available for download.

As a workaround, please use EF Core 2.2.4. For this, leave Target framework=.NET 3.0 in the properties of your project, open NuGet Package Manager > Package Manager Console and run:
PM> uninstall-package Microsoft.EntityFrameworkCore.Relational
PM> install-package Microsoft.EntityFrameworkCore.Relational -version 2.2.4

techieRaja
Posts: 2
Joined: Wed 09 Oct 2019 21:04

Re: EFCore error

Post by techieRaja » Thu 10 Oct 2019 18:42

Thanks for the response.
For people who face this problem, below are the nuget package versions that got things working -

"Devart.Data.Oracle.EFCore" Version="9.8.838"
"Microsoft.EntityFrameworkCore" Version="2.2.6"
"Microsoft.EntityFrameworkCore.Relational" Version="2.2.6"
"Microsoft.EntityFrameworkCore.Tools" Version="2.2.6"
"Microsoft.Extensions.Configuration.Json" Version="2.2.0"

Post Reply