ODAC 12c and Entity Framework 6
Asked Answered
G

4

13

Can anyone tell me if the Oracle Data Access Components 12c is compatible with Entity Framework 6? The Oracle website is a nightmare for documentation and cannot find any references on how to resolve this.

I have an existing project which I am trying to upgrade to ODAC 12c and EF6 but I'm getting the following error which I am struggling to resolve:

exception

I created a fresh project to rule out any issues with my existing project and I get the same problem. I believe it to be an issue with the app.config file edited automatically by the Entity Framework Power Tools Beta 4 (Reverse Engineer Code First):

config file

Can anyone point me in the right direction?

Gasconade answered 21/10, 2013 at 15:33 Comment(9)
After a couple of days research, I believe that EF6 was released after ODAC 12c, so ODAC 12c & 11.2 work with EF5 but not EF6. So now I need to rollback to EF5 I guess :(Gasconade
ODAC 12c Release 2 is now available but I can't see any reference to whether it supports EF6: oracle.com/technetwork/topics/dotnet/utilsoft-086879.htmlGasconade
I also agree Oracle's documentation is a messRampage
ODP.net 12 release 2 does not support EF6. Word they gave me via twitter was summer '14.Halm
@Halm thanks for the update, can you link to the tweet?Gasconade
twitter.com/OracleDOTNET/statuses/421165469681217536Halm
Another milestone missed. Here is a slide deck from a presentation on ODAC 12c Release 2 that says it would support EF 6. php.vncvr.ca/files/netbc/Oracle_NETBC_presentation.pdfSlush
I also stumbled on the same assumption that the latest ODAC release was compatible. I was trying to set up a new EDMX through the wizard and before after setting up the connection it complains that the data provider can't work with EF6...ARRRRGGGHHH!Imperil
12c R3 beta has been announced and sports EF6. See accepted answer below.Gasconade
F
2

**Oracle Data Access Components 12c Release 3 Beta 2 ** ODAC 12c R3 is the first ODP.NET release to certify with Entity Framework (EF) 6 and EF Code First. http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html

Fellmonger answered 9/10, 2014 at 5:40 Comment(1)
Thank you for posting the news on the new release.Gasconade
D
3

Devart recently announced Oracle 12c support. You may want to consider using their provider instead.

Dianadiandra answered 22/10, 2013 at 16:44 Comment(1)
This is a viable option as a paid 3rd party product. Can't understand why Oracle can get a faster iteration for their own product's support.Honeysucker
F
2

**Oracle Data Access Components 12c Release 3 Beta 2 ** ODAC 12c R3 is the first ODP.NET release to certify with Entity Framework (EF) 6 and EF Code First. http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html

Fellmonger answered 9/10, 2014 at 5:40 Comment(1)
Thank you for posting the news on the new release.Gasconade
G
1

The error you're receiving states that you didn't add a Oracle.ManagedDataAccess.Client to the providers tag.

Adding this will solve your problem:

<provider invariantName="Oracle.ManagedDataAccessClient"
                type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

but unfortunately will not work in the end due to lack of support for EF6 in ODAC 12c R2, as mentioned in the comments.

Gavage answered 25/8, 2014 at 8:55 Comment(0)
D
1

In additional to add Oracle.ManagedDataAccess.Client provider to configuation/entityframework/providers tag.

<entityFramework>
<providers>
  <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices,Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /></providers></entityFramework>

You may need to add the following DbProviderFactories tag to configuration/ because Oracle installer forgets to add it to the machine.config

  <system.data>
<DbProviderFactories>
  <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
      type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>

Deliciadelicious answered 14/1, 2015 at 2:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.