title: EF Core - No database provider has been configured for this DbContext
body: <p>I am new to EF Core 1.0. Getting below error when I run below command during DB migration</p>
  
  <p>Command</p>
  
  <pre><code> migrations add ApplicationUserIsActive -c ApplicationDbContext
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: No database provider has been
    configured  for this DbContext. A provider can be configured by
    overriding the  DbContext.OnConfiguring method or by using
    AddDbContext on the application  service provider. If AddDbContext is
    used, then also ensure that your  DbContext type accepts a
    DbContextOptions object in its  constructor and passes it to
    the base constructor for DbContext.</p>
  </blockquote>
  
  <p>The StartUp.cs</p>
  
  <pre><code>public class Startup
  {
      public IConfigurationRoot Configuration { get; set; }
  
      public Startup(IHostingEnvironment env)
      {
          var builder = new ConfigurationBuilder()
              .SetBasePath(env.ContentRootPath)
              .AddJsonFile("appsettings.json");
  
          Configuration = builder.Build();
      }
  
      public void ConfigureServices(IServiceCollection services)
      {
  
          services.AddEntityFrameworkSqlServer()
              .AddDbContext&lt;ApplicationDbContext&gt;((serviceProvider, options) =&gt;
  options.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=employee;Trusted_Connection=True;MultipleActiveResultSets=true;")
         .UseInternalServiceProvider(serviceProvider));
  
          services.AddEntityFrameworkSqlServer()
              .AddDbContext&lt;EmplooyeeDbContext&gt;((serviceProvider, options) =&gt;
  options.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=employee;Trusted_Connection=True;MultipleActiveResultSets=true;")
         .UseInternalServiceProvider(serviceProvider));
  
          services.AddTransient&lt;IUserContext, SeedUserContext&gt;();
      }
  
  }
  </code></pre>
  
  <p><strong>.csproj file</strong></p>
  
  <pre><code> &lt;ItemGroup&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.0.0"&gt;
    &lt;PrivateAssets&gt;All&lt;/PrivateAssets&gt;
  &lt;/PackageReference&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.0.3" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="1.0.3" /&gt;
  &lt;PackageReference Include="Newtonsoft.Json" Version="9.0.1" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>
      
    </p>
  
  <p>However when I execute the migration command for other DBContext i.e. "<strong>EmplooyeeDbContext</strong>" the migration commend works fine.</p>
  
  <p>How can I resolve this issue?</p>