How does Database.SetInitializer actually work? (EF code-first create database and apply migrations using several connection strings)
问题 I am trying to write a method to create a database and run migrations on it, given the connection string. I need the multiple connections because I record an audit log in a separate database. I get the connection strings out of app.config using code like ConfigurationManager.ConnectionStrings["Master"].ConnectionString; The code works with the first connection string defined in my app.config but not others, which leads me to think that somehow it is getting the connection string from app