Entity framework connection with oracle database(实体框架连接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.config 和 packages.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数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:实体框架连接oracle数据库
基础教程推荐
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 无法解决整理冲突 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
