title: Connect to Oracle database from asp.net core
body: <p>First off I have read other posts about connecting to an Oracle database, unfortunately they could not help me. I'll describe what I have tried and hopefully someone can point me in the correct direction.</p>
  
  <p>First off I tried to install ODTwithODAC122010 as many sources are saying,but this one gives me a few  process exited with non zero exit code. It says it's successful but nothing seems to be changed.</p>
  
  <p>Next to that I tried installing ODTforVS2017_122010.exe I have an updated Visual Studio professional. It says the installation is a success. This however does not seems to add any option like tutorials describe. With this I mean that there should be something visible in;</p>
  
  <p>visual studio tools -> connect to database -> Oracle database, data provider menu should have something like Oracle for.. This doesn't show up unfortunately..</p>
  
  <p>So I tried connecting to the database in my visual studio project selecting the .net framework data provider for oracle. Here three fields are asked: Server name username and password. I tried filling them in but it couldn't connect.
  For server name I used: IPADDRESS:PORT/SERVICENAME</p>
  
  <p>After that I gave up hope for connecting to the database through visual studio (I can connect to the database using oracle SQL developer).</p>
  
  <p>Then I installing the following nuget packages: 
  - Oracle.ManagedDataAccess
  - System.Configuration.ConfigurationManager
  - System.Security.Permissions
  - System.Security.Principal</p>
  
  <p>And wrote a piece of code to connect to the database like:</p>
  
  <pre><code>using(OracleConnection connect = new OracleConnection(ConnectionDetails.returnConnectionString()))
  {
      connect.Open();
      Console.WriteLine("did it work?" + connect.ServerVersion);
  }
  </code></pre>
  
  <p>Where returnConnectionString returns:</p>
  
  <pre><code>"User Id=MYID;Password=MYPASSWORD;Data Source=IPADDRESS:PORT/SERVICENAME"
  </code></pre>
  
  <p>Unfortunately when I try to run this I'm facing a ExecutionContext.cs not found. This is happening at connect.open();</p>
  
  <p>I'm launching this code at:</p>
  
  <pre><code>    public static void Main(string[] args)
      {
          var a = new DatabaseConnector();
          a.test();
          BuildWebHost(args).Run();
      }
  </code></pre>
  
  <p>As I final word I want to make it clear that I'm using ASP.NET Core and that your suggestions and help will be greatly appreciated!</p>