When I add-Migration, I get the corresponding DbMigration class with Up / Down methods, where I can make schema changes and (using the Sql () method) can also modify data / content.
I would like to be able to make content changes for each migration using a database context. I understand that I can use the Seed method in the Configuration class, but I understand that I can only connect one configuration using my initializer.
I would prefer to use the UpCompleted () / DownCompleted () methods, which would provide access to the db context after the migration is complete. This will allow incremental data / context change scripts to be written in a way that is less error prone than using the Sql () method.
Am I missing something? Is it possible?
Thanks!
source share