0

Using code first migrations it is trivial to migrate to any given migration by using -TargetMigration [MigrationName].

But how do you rollback to before the first migration? What migration do you target for that? The first migration has a Down() just like the rest and the logic is sound - but how do I get it to execute via a update-database command?

1 Answer 1

0

Use this command:

Update-Database -Target 0 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.