I have been working with EF Code First Migrations for a while but until recently had not used it for updating more than a local development database. As I discovered, it is actually pretty easy to run your migrations against different databases. The update-database command has an optional switch for a ConnectionStringName. However, if you are using web.config transformations to manage connection strings for different environments, you may only have one connection string name, with the environment specific connection string being defined in each transform. I’ll explain how I am getting around that.
Tag Archives: Entity Framework
I have been doing SQL development for at least 15 years now but with the advent of Object Relational Mapping (ORM) frameworks like ADO.NET Entity Framework, I have had to write fewer complicated queries in recent years.