【发布时间】:2017-06-16 01:14:37
【问题描述】:
我想在我设置的 webconfig 中将 Oracle EntityFrameWork 添加到 MVC5
<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
【问题讨论】:
-
尝试安装和引用
Oracle.ManagedDataAccess.EntityFramework程序集,例如在nuget.org/packages/Oracle.ManagedDataAccess.EntityFramework。如果仍然无法解决问题,请根据服务器操作系统版本和平台 (x86/x64) 安装 VC++ Redistributable。请注意,您的应用构建的平台版本必须与安装的 redist 包匹配。
标签: oracle asp.net-mvc-5 entity-framework-6