Is there any way to disable migration in Entity Framework 4.3.1? I removed the migrations folder from the project and the generated tables in my database, but it doesn't work! How can you remove the migration?
Hi @PanagiotisKanavos, as you mentioned, it does not require migration.
If you don't want to use migrations but in the same time you want EF to create database for you, you just need to set correct database initializer:
Database.SetInitializer<YourContextType>(new CreateDatabaseIfNotExists<YourContentType>());
Deleting the Migrations
folder has worked for me. I don't get any errors, it puts me back to where I started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With