Reset Entity Framework 7 migrations

asp.net-core entity-framework-core

Question

I'm using Entity Framework 7 beta 5. I started with the mvc template with user management. I have added several migrations, during my trials.

Now I want to delete my database, create a new initial migration and produce a new clean db with it.

However the dnx ef commands do not have a command that I know of that will facilitate this. How do I proceed?

Accepted Answer

What exactly do you need support from EF for? Here's what I'd do:

  • Delete your database
  • Delete all your migrations
  • Configure the context to point to your new, clean database
  • Run dotnet ef migrations add <initial-migration-name>


Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why