Please do not mistake this SO question as a duplicate:
I have the following config for a custom database initializer for code first entity framework:
<entityFramework>
<contexts>
<context type="MyApp.Context, MyApp">
<databaseInitializer type="MyApp.CustomInitializer, MyApp" />
</context>
</contexts>
</entityFramework>
When I run the application all is well and the InitializeDatabase(Context context)
method is called as expected.
However, when running the command Update-Database
in the Package manager console it is not using my custom initializer.
Why does it work when running the app but not from the package manager console? Which initializer will it be using?