Interoperate between ASP.NET MVC and Oracle DB (12c)

折月煮酒 提交于 2019-12-10 17:23:06

问题


I do have a serious problems with between Oracle DB and ASP.NET MVC: How to use Oracle DB in Visual Studio?

My environment is:

  1. Oracle DB (12c)

  2. Visual Stdio 2015

  3. Windows 10 with VMware

  4. Use ASP.net MVC with Entity Framework to connect Oracle DB Data

How can I get ASP.NET MVC (WEBAPI) to work properly with Oracle DB (12c)?


回答1:


How do I create ASP.NET MVC with oracle DB, and as following step by step can tell you how to deal with this issue.

Step1. Download [ODAC](http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html) and install it

Step2. Download Oracle Developer Tools for Visual Studio 2015 and install it

Step 2.5: Restart OS

Step3:Configuring a NET Connect Alias. to copy tnsnames.ora to another folder like as below pictures and modify your connection data

C:\app\client\williehao\product\12.1.0\client_1\Network\Admin

   HTCE7 =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.203)(PORT = 1521))
            (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = misutf8)
            )
          )

Step4: using nuget in Visual Studio to install oracle components as like below picture.

Step5: you can see the ODP.NET in you connection properties

PS: http://www.oracle.com/technetwork/topics/dotnet/tech-info/odac12cr3ds-2390548.pdf



来源:https://stackoverflow.com/questions/36192435/interoperate-between-asp-net-mvc-and-oracle-db-12c

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