问题
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:
Oracle DB (12c)
Visual Stdio 2015
Windows 10 with VMware
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