title: How to get instance of DbContext in ASP.NET Core 2.0 where I want?
body: <p>How to get instance of DbContext in ASP.NET Core 2.0 where I want?
  To connect DataBase I used services</p>
  
  <pre><code>string connection = Configuration.GetConnectionString("DefaultConnection");
  services.AddDbContext&lt;MobileContext&gt;(options =&gt; options.UseSqlServer(connection));
  </code></pre>