实体框架6(5)连接到Oracle [英] Entity Framework 6 (5) connection to Oracle

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

问题描述

我正在尝试为.net中使用Oracle的应用程序套件编写一个数据访问库。我们目前使用NHibernate,并且正在考虑迁移,因为它似乎不被支持。



我正在使用Visual Studio 2013,我们已经构建了我们的Oracle数据库。我们没有写更新它(这是db家伙的域名)。所以这不会是我们结束的任何计算的一部分。



服务器上的客户端是32位,所以我们现在要坚持下去。它已经在GAC'd,而不需要改变它。所以我们的开发箱上有32位客户端。



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



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



我读了一个oracle论坛,一次说,我需要将我的实体框架设置为5.0而不是6.0。这是很好的,但我该怎么做?

解决方案

EF 6支持现在由ODAC 12c Release 3 Beta提供: / p>

从.Net开发者通讯(强调我的):



新下载:ODAC 12c Release 3 Beta新功能ODAC beta包括
实体框架6 ,代码优先,代码优先迁移,.NET Framework
4.5.2认证,托管ODP.NET XML数据库和托管ODP.NET分发没有Oracle.ManagedDataAccessDTC.dll的事务支持。


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.

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.

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.

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).

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?

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?

解决方案

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

From the .Net Developer newsletter (emphasis mine):

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.

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

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