Q:

The Entity Framework provider type 'Oracle.ManagedDataAccess.EntityFramework' could not be loaded

I am trying to connect to Oracle using the Oracle Data Provider.NET (ODP.NET) using Entity Framework v6 in an MVC application.
I have installed ODP.NET from here:
https://www.nuget.org/packages/odp.net.entityframework/6.121.1-beta
I have configured my web.config file as follows:
<connectionStrings>
    <add name="MyDB" connectionString="User ID=MyUser;Password=MyPassword;Data Source=MyDatabase; Persist Security Info=False" providerName="Oracle.ManagedDataAccess" />
</connectionStrings>

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

However, when I try to call my EF Context, I get the following error:

The Entity Framework provider type 'Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' registered in the application config file for the ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.EntityFramework' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application

I have spent a lot of time searching for help with this. Would be very grateful for any help!
Thanks!
Martin

A:

Adding this section to the web.config, along with the steps above, seems to have fixed this:
<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.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>

</system.data>

