I have 2 questions:
1) How can I run Seed() method from the package-manager console without updating-database model?
2) Is there a way how to call Seed() method in the code?
Thx for any advice.
I have 2 questions:
1) How can I run Seed() method from the package-manager console without updating-database model?
2) Is there a way how to call Seed() method in the code?
Thx for any advice.
If you use context initiliazer as MigrateDatabaseToLatestVersion, seed method in configuration should be run automatically. Don't think you need to call it manually.
After research I finally found the workaround for this issue:
1) Make
Configuration
public:2) Add the code below anywhere. It will run the latest migration and update your database: