Usage of NPoco in .net Core
<p>I have recently started diving into the new .net core along with asp.net core mvc. There have been several issues that I have come across but have been able to get most of them answered on my own. The one that has really stumped me is the use of NPoco.</p>

<p>How are you supposed to create the database instance?</p>

<p>The documentation reads: </p>

<pre><code>IDatabase db = new Database("connStringName");
List&lt;User&gt; users = db.Fetch&lt;User&gt;("select userId, email from users");
</code></pre>

<p>This is not correct for DNXCORE50 as this constructor has been excluded for DNCORE50</p>

<p>I have also attempted this:</p>

<pre><code>IDatabase _db = new Database(new SqlConnection(ConnStr));
_db.Single&lt;string&gt;("SELECT Username FROM dbo.Member");
</code></pre>

<p>When this code is ran I get a 'NullReferenceException'</p>

<p>Does anyone know how to get NPoco working properly?</p>