Manually Provide DbContext to DbMigrator
问题 Platform .NET 4.5 and Entity Framework 6. Question I have the following code to execute a Migration: //The following function just returns an object of the Configuration() class //generated by code migrations var migratorConfig = currentMigrationProvider.CreateDbMigrationConfiguration(); var dbMigrator = new System.Data.Entity.Migrations.DbMigrator(migratorConfig); dbMigrator.Update(); The problem is that Update() function tries to create an instance of my DbContext class and for a few good