实体框架与oracle数据库连接 [英] Entity framework connection with oracle databse

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

问题描述

我正在使用Entity框架6.1版本和oracle 11.
我是实体框架的新功能。
任何人都可以提出与oracle连接的前提条件。
web.config中需要进行任何更改。
在web.config中,默认是连接sql,我如何更改它以使用Oracle而不是sql。

解决方案

我有一个示例项目,EF 6和oracle 11g,仅使用nuget软件包



https://github.com/ovidiubuligan/EntityFramework_Oracle_sample



最重要的部分是 app.config packages.config



如果你看看App.config,你会看到它会使用连接字符串:
connectionString =Data Source =(DESCRIPTION =(ADDRESS_LIST = ... 而不是 tns文件 a href =http://www.orafaq.com/wiki/Tnsnames.ora =nofollow> http://www.orafaq.com/wiki/Tnsnames.ora 我发现更多舒适。


I am using Entity framework 6.1 version and oracle 11. I am new to entity framework. Can anyone please suggest what are the prerequisites for connecting with oracle. any changes are required in the web.config. In web.config,default it is connecting with sql,how can i change it to use Oracle instead of sql.

解决方案

I have a sample project with EF 6 and oracle 11g which only uses nuget packages:

https://github.com/ovidiubuligan/EntityFramework_Oracle_sample

The most important parts are App.config and packages.config.

If you look in App.config you will see that it will use the connection string : connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=... instead of a tns file http://www.orafaq.com/wiki/Tnsnames.ora . I find it more confortable.

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

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