4

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)?

5
  • 1
    I have flagged this question as too broad because I believe there is a better more consice question you could ask. What is preventing you from using Oracle DB in Visual Studio? What exactly do you want to do? Commented Mar 24, 2016 at 3:04
  • 1
    @MatthewCliatt , Thanks your comment , in fact I just want to use Oracle Data in Visual Stdio 2015 with WebAPI and Entity Framework , so that I create this topic and give my ideas to tell someone how to connect it .thanks again Commented Mar 24, 2016 at 3:25
  • 2
    willie, I tidied your question a bit, but to be useful for future readers, you need to add information about what the problem you faced was, as Matthew asked. What had you tried before finding your solution, and what results did you see? Including error messages is helpful, as other users may search for those and find this Q&A. Commented Apr 6, 2016 at 15:09
  • @Mogsdad thank you very much for your notice , I will be following your comment in my Q&A ,thanks again Commented Apr 6, 2016 at 23:24
  • @Mogsdad Sorry to bother you again , could you do me a favor if you don't mind, I have another Q&A that had closed by someone, but I think it is can help someone, unfortunately it was closed ,hopefully you can aid me to tell me what is going on or what's problem or mistake with me Question URL I wish I can make a good quantity contents to help someone who needs assistance ,thanks a lot ,Willie Commented Apr 6, 2016 at 23:29

1 Answer 1

6

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 enter image description here
enter image description here

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

enter image description here

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

enter image description here enter image description here

   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.
enter image description here

Step5: you can see the ODP.NET in you connection properties enter image description here

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

Sign up to request clarification or add additional context in comments.

5 Comments

I was able to add the connection to Oracle in visual studio using server explorer, but when go to Entity Framework, oracle doesn't appear as a provider. What I'm missing?
Hi @JuanCarlosOropeza in my opinion ,you didn't install correct about Oracle components, maybe you can do it again and then restart the VS again, thanks
Yes, I try that. This was a fresh installation of oracle components using the newer versions. Is there a check list or something I can follow to see if everything is installed properly? I have do the same for postgresql and my app.config get updated with some reference. Here I didnt saw that.
Hi @JuanCarlosOropeza I've set this environment up many times however Oracle isn't very easy to setup ,so in my mind , I will create new OS environment in VM and then try setup everything I need to double check which one I miss or fail, hopefully my information is okay for you
Hi @JuanCarlosOropeza I didn't use the newer versions to do it and my answer is included list(steps1~5) , maybe you can give me your installation list that is included all versions number you are using , I will try it when I have a free time for you, thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.