問題描述
我有運行新創(chuàng)建的 WebAPI 2 項目的 Visual Studio Professional 2015.我想使用實體框架(首先來自現(xiàn)有數(shù)據(jù)庫的代碼)從數(shù)據(jù)庫創(chuàng)建數(shù)據(jù)模型.所以我從oracle下載了這個.
I have Visual Studio Professional 2015 running a newly created WebAPI 2 project. I wanted to create a data model from database using entity framework (code first from existing database). So I downloaded this from oracle.
ODAC 12.2c 第 1 版和適用于 Visual Studio 的 Oracle 開發(fā)人員工具 (12.2.0.1.0)
ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
安裝后,我使用托管驅(qū)動程序成功測試連接到數(shù)據(jù)庫,并繼續(xù)執(zhí)行 EF 向?qū)?但最后我得到這個錯誤
After installation I successfully tested connected to the database using Managed driver, and proceed through the EF wizard. But at the end I get this error
我嘗試了托管和非托管驅(qū)動程序.我也嘗試添加對這些庫的引用
I tried both Managed and Unmanaged drivers. I also tried adding references to these libraries
Oracle.ManagedDataAccessOracle.ManagedDataAccess.EntityFrameworkOracle.DataAccess.EntityFrameworkOracle.DataAccess
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
我檢查了項目正在使用的實體框架版本,它說它使用的是最新的 6.1.3
I check my version of Entity Framework the project is using and it says its using the latest 6.1.3
推薦答案
從 Nuget 添加此引用后:
after adding this references from Nuget:
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
Oracle.ManagedDataAccess Oracle.ManagedDataAcces.EntityFramework Oracle.DataAccess.EntityFramework Oracle.DataAccess
您必須在 x86 中編譯項目,然后使用向?qū)е卦?我們在我的辦公室多次遇到您的問題,我認為這是因為項目配置了任何 Cpu"
you have to compile the project in x86 and try again with the wizard. We have had your problem at my office several times, and I think It′s caused because of having the project configured with "any Cpu"
希望能幫到你
這篇關(guān)于找不到與此版本兼容的實體框架數(shù)據(jù)庫提供程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!