简体   繁体   English

带有Entity Framework 6的Oracle 11.2解决方法

[英]Oracle 11.2 with Entity Framework 6 workaround

So in Visual Studio 2013 by default, when you start a new project, in your NuGet packages you have Entity Framework 6.1.1. 因此,默认情况下,在Visual Studio 2013中,当您启动一个新项目时,在NuGet包中,您具有Entity Framework 6.1.1。 We are still running Oracle 11.2 (11g), and of course you need at least 12c to be able to connect to EF6. 我们仍在运行Oracle 11.2(11g),当然您至少需要12c才能连接到EF6。

So I figure why not go back to EF5 and then this will not be an issue. 因此,我认为为什么不回到EF5,那么这将不是问题。 However, when you uninstall 6, there are dependency issues. 但是,当您卸载6时,存在依赖性问题。 For example, if you are doing an MVC app, then you get the message "Unable to uninstall 'EntityFramework 6.1.1' because 'Microsoft.AspNet.Identity.EntityFramework 2.1.0' depend(s) on it.". 例如,如果您正在执行MVC应用程序,则会收到消息“由于'Microsoft.AspNet.Identity.EntityFramework 2.1.0'依赖它,因此无法卸载'EntityFramework 6.1.1'”。 Of course if you uninstall Identity EntityFramework and install EF5, then there is no compatible version of Identity framework, so your projects break. 当然,如果您卸载Identity EntityFramework并安装EF5,则没有兼容版本的Identity框架,因此您的项目会中断。

Is there any way to get around this? 有什么办法可以解决这个问题? We would like to use Entity Framework for our projects, but we know it will be a while until the database is updated from 11.2 to 12c, so we need a work around for now. 我们想将Entity Framework用于我们的项目,但是我们知道将数据库从11.2更新到12c还需要一段时间,因此我们现在需要解决。

you have to install ODAC 12c Release 4 and Oracle Developer Tools for Visual Studio (12.1.0.2.4) in your machine where you have installed Visual Studio 2013 您必须在安装了Visual Studio 2013的计算机中安装ODAC 12c第4版和用于Visual Studio的Oracle Developer Tools(12.1.0.2.4)

Then you have to use nuget in order to install the dlls in the project. 然后,您必须使用nuget才能在项目中安装dll。

as @Alexey Merson says, you don´t need a 12c database in order to connect and work. 正如@Alexey Merson所说,您不需要12c数据库即可进行连接和工作。

Before deploy the application to a server, you will have to install ODAC 12c Release 4 in the server too. 在将应用程序部署到服务器之前,您还必须在服务器中安装ODAC 12c Release 4。

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM