title: Can't connect to Mongo DB in .Net Core API
body: <p>Been working on a .Net Core web app and right now I want to connect Mongo with the API that is written in .Net C# on .Net Core.  However, everything is inside Docker.  That being said, each element is is working.  I can edit the database from the command line so I know its up and running.  Also, I should note I am on the latest Ubuntu.</p>
  <p>In the .csproj file I added Mongo drivers:</p>
  <pre><code>&lt;PackageReference Include=&quot;MongoDB.Driver.Core&quot; Version=&quot;2.3.0&quot; /&gt;
  &lt;PackageReference Include=&quot;MongoDB.Bson&quot; Version=&quot;2.3.0&quot; /&gt;
  </code></pre>
  <p>And in the program.cs file I add:</p>
  <pre><code>using MongoDB.Driver; // at top
  using MongoDB.Bson;
  ...
  ...
  var mongo = MongoClient(&quot;mongodb://localhost:27017&quot;); // in main method
  </code></pre>
  <p>This is the error I get when I build the app with docker:</p>
  <pre><code>Program.cs(13,25): error CS0103: The name 'MongoClient' does not exist in the current context [/src/src/Identity.api/Identity.api.csproj]
  </code></pre>
  <p>Did I add the right drivers, are they in the wrong spot?</p>
  <p>Let me know if any additional info is needed. Thanks so much, I look forward to being able to connect to the DB!</p>