title: Is there any better way to add the dbcontext to a Asp.core MVC controller?
body: <p>In the new MVC Core it seems the standard way to get the context to the controller is by doing this</p>
  
  <pre><code>public class BaseController : Controller
      {
  
          public readonly ReportDBContext _db;
  
          public BaseController(ReportDBContext db)
          {
              _db = db;
          }
  }
  </code></pre>
  
  <p>I can then use </p>
  
  <pre><code>public class HomeController : BaseController
      {
  
          public HomeController(ReportDBContext db) : base(db) { }
  }
  </code></pre>
  
  <p>To make this a little easier in all other controllers.
  Normally in Asp.net MVC I can get a context any time by using <code>new ReportDBContext()</code></p>
  
  <p>Is there a similar way of this now, or do I have to have the context in all controllers in asp.core MVC?</p>