Reputation: 149
Is it possible to run scripts in Package manager Console to update Entity Framework with multiple commands? I'd want a script like:
Update-database -migration oldTragetMigration
remove-migration
remove-migration
add-migration newMigration
update-database
I want to be able to run the script in sequences so that I don't have to wait for each step to take place?
Not even sure if I can write a c# script for that kind of thing.
Thanks in advance!
Upvotes: 1
Views: 213
Reputation: 7105
You can always add new file in your project (right click on project -> Add New Item -> Text file
), and name it, for example
script.ps1
Edit it, put your commands inside, save. Open Package Manager Console and run it. You will need to specify path, like this:
.\[project folder]\script.ps1
Upvotes: 2