title: How create multiple db context instances by connecting strings?
body: <p>In C#, MVC code first application I have</p>
  
  <pre><code>public class CarContext : DbContext { }
  </code></pre>
  
  <p>class <strong>in first version of application</strong>. And connection string is like</p>
  
  <pre><code>&lt;add name="CarContext" providerName="System.Data.SqlClient" Integrated Security=true;
  connectionString="Data Source=Dragon; Initial Catalog=CarDBv1;"/&gt;
  </code></pre>
  
  <p>When I run application, first version of database is created - <strong>CarDBv1</strong>. </p>
  
  <p>Then I edit my CarContext class, for example, add new table, change any property etc., also change version of application, change connection string</p>
  
  <p><code>Initial Catalog=CarDBv1;</code> to <code>Initial Catalog=CarDBv2;</code> and run project. In this case I have 2 database: <code>CarDBv1</code> and <code>CarDBv2</code>. But, CarContext class is same in applications.</p>
  
  <p>Now, I need to connect both database and their context(CarContext) from any console application and use their tables for converting, reading etc.</p>
  
  <p>I found a similar answer here: <a href="https://stackoverflow.com/a/16860878/1534785">https://stackoverflow.com/a/16860878/1534785</a></p>
  
  <p>But in my applications context name is same.</p>
  
  <p>How can I create 2 instances for every CarContext in applications by their database connection string?</p>