Entity framework connection with oracle database

独自空忆成欢 提交于 2019-12-01 13:04:25

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/29969699/entity-framework-connection-with-oracle-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!