title: MVC 6 EF7 RC1 creating multiple dbcontexts
body: <p>I am trying to figure out how to create a second DB context in EF7 RC1.  In the past I could use a constructor with :base("connectionName") but that no longer seems an option since it says cannot convert string to System.IServiceProvider.  </p>
  
  <p>My second context code is as follows:</p>
  
  <pre><code>public class DecAppContext : DbContext
      {
  
          public DecAppContext()
            //  :base("DefaultConnection")
          {
  
          }
          public DbSet&lt;VignetteModels&gt; VignetteModels { get; set; }
          public DbSet&lt;VignetteResult&gt; Result { get; set; }
      }
  }
  </code></pre>
  
  <p>In my config.json I have the connection specified:</p>
  
  <pre><code>"Data": {
      "DefaultConnection": {
        "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=aspnet5-xxxxx...;Trusted_Connection=True;MultipleActiveResultSets=true"
      }
    }
  </code></pre>
  
  <p>In my configure services section of my startup I have both contexts added:</p>
  
  <pre><code>services.AddEntityFramework()
                  .AddSqlServer()
                  .AddDbContext&lt;ApplicationDbContext&gt;(options =&gt;
                      options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]))
                  .AddDbContext&lt;DecAppContext&gt;(options =&gt; options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));
  </code></pre>
  
  <p>The applicationDB context works fine since I can create a user and login without issue</p>
  
  <p>However when I try to access the other context as in my controller via: </p>
  
  <pre><code>private DecAppContext db = new DecAppContext();
  var vignette = db.VignetteModels.SingleOrDefault(v =&gt; v.CaseId == vid);
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>No database providers are configured. Configure a database provider by
    overriding OnConfiguring in your DbContext class or in the
    AddDbContext method when setting up services.</p>
  </blockquote>
  
  <p>Any working examples in EF7 RC1 with multiple db contexts and accessing them would be much appreciated.  </p>