Entity Framework 6 (5) 与 Oracle 的连接 [英] Entity Framework 6 (5) connection to Oracle

查看:32
本文介绍了Entity Framework 6 (5) 与 Oracle 的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我们在 .net 中使用 Oracle 的应用程序套件编写数据访问库.我们目前使用 NHibernate,并且正在考虑迁移,因为它似乎没有得到很好的支持.

I am attempting to write a Data Access library for our suite of applications that use Oracle in .net. We currently use NHibernate and are thinking of migrating away as it appears to not be supported all that well.

我正在使用 Visual Studio 2013,我们已经构建了我们的 Oracle 数据库.我们没有写来更新它(那是 db 家伙的领域).因此,这不会成为我们任何计算的一部分.

I am working with Visual Studio 2013 and we have already constructed our Oracle Database. We don't have writes to update it (that is the domain of the db guys). So that will not be part of any calculation on our end.

服务器上的客户端是 32 位的,所以我们现在将坚持使用它.它已经在那里被GAC'd,不需要改变它.所以我们的开发盒上有 32 位客户端.

The client on the server is 32 bit, so we are going to stick with that for now. It is already GAC'd in there, and no need to change it. So we have the 32 bit client on our development boxes.

我通过 nuget 将 EntityFramework 6.1.0 安装到我的项目中.我的项目中安装了 ODAC 1.112.3.20.应用程序的 32 位版本.我还安装了 ODP.net.x86 驱动程序(也通过 nuget).

I have EntityFramework 6.1.0 installed into my project via nuget. I have ODAC 1.112.3.20 installed in my project. The 32bit version of the application. I also have the ODP.net.x86 driver installed (also via nuget).

问题是每次我尝试创建 ADO.net 数据库连接时,oracle 提供程序都不是一个选项?我错过了什么?我需要什么才能让它工作?

The problem is that everytime I attempt to create an ADO.net Database connection, the oracle provider is never an option? What am I missing? What do I need to get this to work?

我曾经读过一个 oracle 论坛,上面说我需要将我的实体框架设置为 5.0 而不是 6.0.哪个很好,但我该怎么做呢?

I read an oracle forum one time that said I need to set my Entity Framework to 5.0 and not 6.0. Which is fine, but how do I do that?

推荐答案

现在 ODAC 12c Release 3 Beta 提供 EF 6 支持:

EF 6 support is now provided by ODAC 12c Release 3 Beta:

来自 .Net 开发者时事通讯(重点是我的):

From the .Net Developer newsletter (emphasis mine):

新下载:ODAC 12c Release 3 Beta 新的 ODAC Beta 包括实体框架 6、代码优先、代码优先迁移、.NET 框架4.5.2 认证、托管 ODP.NET XML DB 和托管 ODP.NET 分布式事务支持,无需 Oracle.ManagedDataAccessDTC.dll.

New Download: ODAC 12c Release 3 Beta The new ODAC beta includes Entity Framework 6, Code First, Code First Migrations, .NET Framework 4.5.2 certification, managed ODP.NET XML DB, and managed ODP.NET distributed transaction support without Oracle.ManagedDataAccessDTC.dll.

这篇关于Entity Framework 6 (5) 与 Oracle 的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆