Entity Framework Code First and Oracle ODAC 12c Release 3 Error

.net c# entity-framework-6 oracle


A bit stumped with this one...

I'm receiving the following error when setting up Code First on Entity Framework and Oracle...

No Entity Framework provider found for the ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client'. Make sure the provider is registered in the 'entityFramework' section of the application config file.

With the following setup...

Entity Framework 6.1.1

ODAC 12c Release 3

Any ideas on how to fix this problem?

I've included the app.config file below...

<?xml version="1.0" encoding="utf-8"?>

    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    <add name="Context" connectionString="DATA SOURCE=****;PASSWORD=****;PERSIST SECURITY INFO=True;POOLING=False;USER ID=SYSTEM" providerName="Oracle.ManagedDataAccess.Client" />
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
        <parameter value="v11.0" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
10/16/2014 12:00:03 PM

Popular Answer

since you have used a providerName Oracle.ManagedDataAccess.Client in connectionString. you need to add a line in following section to define it:

<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices,OracleManagedDataAccess.EntityFramework" />
10/28/2014 6:18:01 AM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow