Could not load file or assembly Oracle.ManagedDataAccess.EntityFramework in MVC5

asp.net-mvc-5 entity-framework-6 oracle

Question

I want add Oracle EntityFrameWork to MVC5, in the webconfig i set <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="mssqllocaldb" /> </parameters> </defaultConnectionFactory> <providers> <provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version=6.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework>.

But when run project but it throw ex In method ApplicationDbContext like this

1
0
6/16/2017 1:23:19 AM

Accepted Answer

What you need:

  • Microsoft Visual Studio 2015 or later with .NET Framework 4.5 or later.
  • Oracle Database 12c or later.
  • Oracle Data Access Components (ODAC) 12c Release 3 (12.1.0.2.1) or later from OTN. The ODAC download includes Oracle Developer Tools for Visual Studio and ODP.NET
  • Files required for this tutorial.
  • Using NuGet to Install and Configure Oracle Data Provider for .NET tutorial.(install: Oracle.ManagedDataAccess.EntityFramework from Nuget).

refer: http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/dotnet/2015/entityframework_linq_modelfirst/Entity%20Framework%20LINQ%20and%20Model%20First.html#overview

0
6/16/2017 2:09:39 AM


Related Questions





Related

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