title: ASP.NET Core DbContext injection
body: <p>I have a <code>ConfigurationDbContext</code> that I am trying to use.  It has multiple parameters, <code>DbContextOptions</code> and <code>ConfigurationStoreOptions</code>.</p>
  
  <p>How can I add this DbContext to my services in ASP.NET Core?</p>
  
  <p>I have attempted the following in my Startup.cs:</p>
  
  <pre><code>ConfigureServices
  ....
  services.AddDbContext&lt;ConfigurationDbContext&gt;(BuildDbContext(connString));
  ....
  
  
  private ConfigurationDbContext BuildDbContext(string connString)
  {
      var builder = new DbContextOptionsBuilder&lt;ConfigurationDbContext&gt;();
      builder.UseSqlServer(connString);
  
      var options = builder.Options;
  
      return new ConfigurationDbContext(options, new ConfigurationStoreOptions());
  }
  </code></pre>