title: No database providers are configured EF7
body: <p>I seem to be getting this error message when using Entity Framework 7 and MVC6</p>
  
  <blockquote>
    <p>System.InvalidOperationException 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>I believe i have done everything i am supposed to be doing, so maybe its a bug.  I am using version 7.0.0-beta7 of Entity Framework.</p>
  
  <p>I have setup my DbContext, an interface so i can mock DbContext (was needed in EntityFramework 6 for unit testing).  My services take the interface as a constructor and i have setup DI in MVC 6.</p>
  
  <p>In my Startup.cs file i have the following</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      // entity framework
      services.AddEntityFramework()
          .AddSqlServer()
          .AddDbContext&lt;MyDbContext&gt;(options =&gt;
              options.UseSqlServer(Configuration["Data:MyConnection:ConnectionString"])
          );
  
      // Add MVC services to the services container.
      services.AddMvc();
  
      // new context on each request
      services.AddScoped&lt;IMyDbContext, MyDbContext&gt;();
  }
  </code></pre>
  
  <p>I have checked my connectionString and that is returning a valid connection.  I have also checked in my service that the object is being injected, and it is not null, so that should all work. </p>
  
  <p>My config.json file looks like this</p>
  
  <pre><code>{
      "Data": {
          "MyConnection": {
              "ConnectionString": "Server=(local);Database=XXXX;Trusted_Connection=True;"
          }
      }
  }
  </code></pre>
  
  <p>My DbContext does not override the OnConfiguring method, because i believe it is not needed as i am doing it all as above?  Am i right?  What am i missing?  Looked at lots of different websites, i guess some are using old code, because some methods dont exist and other websites have the same as what i have.</p>