In the Entity Framework, using Enable-Migrations creates a Migrations folder containing the Configuration inherited from the DbMigrationsConfiguration , like this:
internal sealed class Configuration : DbMigrationsConfiguration<MyDbContext> { ... }
All created migrations created using Add-Migration are also placed in the Migrations folder.
public partial class Init: DbMigration { public override void Up() { ... } public override void Down() { ... } }
I did not find the code that binds the two together (for example, having a configuration property during migration). The only thing I found is that both of them are placed in the same folder. If I have more than 1 DbContext and therefore more than 1 configuration, I wonder how these DbMigration differ?
Question: How are the DbMigration classes related to Configuration ?
c # entity-framework code-first-migrations
mehrandvd
source share