The best way to enable multiple migrations that I recommend is that
1. Create configuration file according to the context type and set the target to another directory.
Enable-Migrations -ContextType ApplicationDbContext -MigrationsDirectory IdentityMigration
2. Rename Configuration class in IdentityMigration to IdenityConfiguration
2. When adding migration point, just add -ConfigurationType
Add-Migration -ConfigurationType IdentityConfiguration Employee-Data-1
3. When updating database, just add -ConfigurationType too
Update-Database -ConfigurationType IdenityConfiguration
**Note that: case-insensitive is only in VB.NET
ไม่มีความคิดเห็น:
แสดงความคิดเห็น