EF MigrationConfiguration per db context

Creating a custom migrations cfg for a particular context:

enable-migrations -ContextTypeName HereGoes.Custom.Context.TypeName -ConnectionStringName IfNeeded -MigrationsDirectory LetsCustomiseMigrationsStorage


Adding a custom migration for a specific configuration:

add-migration -ConfigurationTypeName HereGoes.Custom.MigrationsConfiguration.TypeName


Updating a database using custom migration configuration:

 update-database -ConfigurationTypeName HereGoes.Custom.MigrationsConfiguration.TypeName -ConnectionStringName IfNeeded 
blog comments powered by Disqus