title: Using Entity Framework with two seperate database (Development and Production)
body: <p>So I have been working on a project using Entity Framework 5 in development for a while and it is decided that the code will need to be moved to a production environment.</p>
  
  <p>My question is what would be a good approach to do this?</p>
  
  <p>My initial thought is to have two edmx files in my project and then comment out the production connection string in my development environment and vice-versa in the production environment. However that doesn't seem feasible as I cannot have two entity model with the same name in the  connection string, thus resulting in changing the model "context" instance throughout my code which doesn't make sense.</p>
  
  <p>Another thought that I had was just to modify the connection string of the model used by the development database to point to the production datasource (since they both have same table structure). But I don't know if I will break anything here.</p>
  
  <p>I have looked at this post here and it didn't help: <a href="https://stackoverflow.com/questions/6007659/entity-framework-working-with-both-production-and-development-database">Entity framework working with both production and development database</a> </p>
  
  <p><strong>Note:</strong> I am not using the code first pattern but generating the model from the database and that both the development and production database have syncing database structure.</p>
  
  <p>Thanks!</p>