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

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

问题描述

我正在使用实体框架 6.1 版本和 oracle 11.我是实体框架的新手.谁能建议与oracle连接的先决条件是什么.web.config 中需要进行任何更改.在web.config中,默认是用sql连接的,如何改成使用Oracle而不是sql.

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.

推荐答案

我有一个带有 EF 6 和 oracle 11g 的示例项目,只使用 nuget 包:

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

https://github.com/ovidiubuligan/EntityFramework_Oracle_sample

最重要的部分是 App.configpackages.config.

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

如果您查看 App.config,您会看到它将使用连接字符串:connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=... 而不是 tns 文件 http://www.orafaq.com/wiki/Tnsnames.ora .我觉得更舒服.

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天全站免登陆