問(wèn)題描述
我有運(yùn)行新創(chuàng)建的 WebAPI 2 項(xiàng)目的 Visual Studio Professional 2015.我想使用實(shí)體框架(首先來(lái)自現(xiàn)有數(shù)據(jù)庫(kù)的代碼)從數(shù)據(jù)庫(kù)創(chuàng)建數(shù)據(jù)模型.所以我從oracle下載了這個(gè).
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 開(kāi)發(fā)人員工具 (12.2.0.1.0)
ODAC 12.2c Release 1 and Oracle Developer Tools for Visual Studio (12.2.0.1.0)
安裝后,我使用托管驅(qū)動(dòng)程序成功測(cè)試連接到數(shù)據(jù)庫(kù),并繼續(xù)執(zhí)行 EF 向?qū)?但最后我得到這個(gè)錯(cuò)誤
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ū)動(dòng)程序.我也嘗試添加對(duì)這些庫(kù)的引用
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
我檢查了項(xiàng)目正在使用的實(shí)體框架版本,它說(shuō)它使用的是最新的 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 中編譯項(xiàng)目,然后使用向?qū)е卦?我們?cè)谖业霓k公室多次遇到您的問(wèn)題,我認(rèn)為這是因?yàn)轫?xiàng)目配置了任何 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í)體框架數(shù)據(jù)庫(kù)提供程序的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!