Oracle ODAC 12c Release 3 32-bit Beta support EF 6.x?

I have Windows 8.1 64 bit with Visual Studio 2013. I have installed the latest Oracle ODAC 12c Release 3 32 bit beta which claims to support EF 6. When I add ADO.NET Entity Framework to my project and select mine Oracle data connection, it prevents me from choosing Entity Framework 6.0 version. It has Entity Framework 5.x selected and the 6.x version is greyed out. It says, "An Entity Framework database provider that is compatible with the latest version of Entity Framework was not found for your data connection." Why is this?

+3


source to share


3 answers


I did the following to get it working: -

First install of ODAC 12c Release 3, which includes support for Entity Framework 6 First Code and First Migrations; NuGet, .NET Framework 4.5.2; and ODP.NET, a managed XML DB driver. According to

http://www.oracle.com/technetwork/topics/dotnet/whatsnew/index.html

Adding two links to my project links and they are:

Oracle.ManagedDataAccess.dll

Oracle.ManagedDataAccess.EntityFramework.dll



Install EF6.1.1 using NuGet using the following command in the Package Manager Console (you can enter it using Tools-> NuGet Package Manager -> Package Manager Console):

Install-Package EntityFramework -Version 6.1.1

      

And change your web.config or web.config to use Oracle.ManagedDataAccess by adding Provider and a valid connection string like:

 <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <section name="Oracle.ManagedDataAccess.Client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <entityFramework>
    <contexts>
      <context type="App.Context.Default, App.Context">
        <databaseInitializer type="MyProject.Context.Config.ContextInitializer, MyProject.Context" />
      </context>
    </contexts>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <connectionStrings>
    <add name="Default" providerName="Oracle.ManagedDataAccess.Client" connectionString="DATA SOURCE=XE;USER ID=User" />
  </connectionStrings>

      

Rebuild your app as x86 and start using EF6, you can test if it works by adding a model using ADO.Net Entity Model using Code First

+7


source


Did you install from this file: ODAC121010Beta2_32bit.zip and then choose to install Oracle developer tools?



This is the only file on this page that includes the Oracle Developer Tools for Visual Studio, which must be updated for design-time EF to work.

0


source


install Oracle.ManagedDataAccess.EntityFramework.dll Specific version to True and rebuild your application. And then try adding ADO.NET Entity wizard again

0


source







All Articles