9

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?

1 Answer 1

12

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

4 Comments

Think that will probably work. Found some thing in the rather verbose output about Identities not being right. I'm trying to use a guid as primary key which set via property initilizer
I just deleted the context snapshot in the migrations folder too and it worked (ef7 rc1)
Can you update your answer to accommodate for EF Core?
The only difference should be that dnx . is replaced by dotnet

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.