title: ConnectionStrings DbContext in EF Core
body: <p>I don't know what I am doing wrong, trying very hard to setup a database project, and keep getting errors related to the connectionstring dbcontext. </p>
  
  <p>I have one applicationdbcontext which is just connecting to localdb </p>
  
  <p>the problem is my other dbcontext which is where my data is seems to be in the wrong place and I am not sure how to fix it. This code is in my models folder</p>
  
  <pre><code>public DbSet&lt;Customer&gt; Customers { get; set; }
  public DbSet&lt;Job&gt; Jobs { get; set; }
  public DbSet&lt;Order&gt; Orders { get; set; }
  public DbSet&lt;Staff&gt; Staff { get; set; }
  public DbSet&lt;RequestType&gt; RequestType { get; set; }
  public DbSet&lt;CustomerJob&gt; CustomerJobs { get; set; }
  
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  {
      optionsBuilder.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=Customers;Trusted_Connection=True;");
  }
  </code></pre>
  
  <p>in startup.cs I have this code.. 
      services.AddDbContext(options =>
          options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
      services.AddDbContext(options =>
          options.UseSqlServer(Configuration.GetConnectionString("ProdConnection")));</p>
  
  <p>in my appsettings config I have this code.. </p>
  
  <pre><code>"ConnectionStrings": {
      "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=BRSCRM;Trusted_Connection=True;MultipleActiveResultSets=true",
      "ProdConnection": "Server=(localdb\\mssqllocaldb;Database=Customers;Trusted_Connection=True;MultipleActiveResults=true"
  },
  </code></pre>
  
  <p>yet when I run my project I get an error that the configuration being supplied is not being used,DI inversion of control indeed, its a bag of cats and its on fire! </p>