1

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!

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.