title: How to connect to an Oracle database Connection from .Net Core
body: <p>Within a .netCore library I want to connect to an Oracle database.  Is there any way I can do that yet?</p>
  
  <p>I have tried the suggestions on <a href="https://stackoverflow.com/questions/37870369/connect-to-oracle-database-with-asp-net-core">another SO post</a>, but it doesn't work, perhaps removed since?  As you can see in my project.json, I'm trying to use "net461".</p>
  
  <p>I'm currently trying using Oracle.ManagedDataAccess.Client via old fashioned ADO.Net.  I also know that Oracle haven't bought out a .netCore connector yet.  But even there I can't get it to work, it struggles to get the <strong>System.Data</strong> included, it errors whenever I try to add it.</p>
  
  <p>My project.json looks like this:</p>
  
  <pre><code>{
    "version": "1.0.0-*",
  
    "dependencies": {
      "NETStandard.Library": "1.6.0",
      "Oracle.ManagedDataAccess": "12.1.24160719",
    },
  
    "frameworks": {
      "netstandard1.6": {
        "imports": [
          "dnxcore50",
          "net461"
        ]
      }
    }
  }
  </code></pre>
  
  <p>This is how I was trying to do it at the moment.</p>
  
  <pre><code>using Oracle.ManagedDataAccess.Client;
  
  public class MyRepository
  {
      public string GetServerVersion()
      {
          var _db = new OracleConnection("User Id=myUser;Password=myPassword;Data Source=MyOracleConnection");
  
          var serverVersion = _db.ServerVersion;
          return serverVersion;
      }
  }
  </code></pre>
  
  <p>However the above doesn't compile as it doesn't have System.Data, which I'm struggling to import.</p>
  
  <p>I'm not entrenched on any particular way of doing it, <strong>I just want the best reasonable option at this point in time</strong>.</p>