Hello,
I add new default values to a table and i need to execute seed method only , any idea ?
Thanks
11 Answer(s)
-
0
If you created seed then run update-database from Package Manager Console.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Update-Database No migrations were applied. The database is already up to date. Done. I need to make some changes in my Entities ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
You can run Add-Migration "Execute_Seed" to create an empty migration.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hello,
PM> Add-Migration "Execute_Seed" To undo this action, use Remove-Migration. PM> Update-Database Applying migration '20171221220937_Execute_Seed'. Done.
The seed method not running.
Any idea plz ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Where is your seed method called?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hello,
It's called from InitialHostDbBuilder.Create from the SeedHostDb Helper
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Well, doesn't the Host DB already exist?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yeah it's exist but i add new tables and i want to add some default values to those tables so i do the same as default languages but when i run the update database it's not working .
I don't understand why because the first time i run the update database to create Database the seed method has been passed correctly but after that for every new migration when i run the update database i don t see the statement : applying seed method ...
Should i try with the migrator app ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Did you run your application?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yes the app it's running
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hello,
It's working now after reloading Visual studio :p .
Thank you ^^
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)