Entity-framework – How to disable migration in Entity Framework 6.0

entityentity-frameworkentity-framework-migrations

I'm trying to ignore the "Automatic" migration using Entity Framework 6.0 rc1. My problem is that I don't want this feature right now and every time that my application runs I can see all entity logs trying to create all tables.

Anticipate thanks.

Best Answer

Try this:

internal sealed class Configuration : DbMigrationsConfiguration<YourContext>
{
    public Configuration()
    {
        AutomaticMigrationsEnabled = false;
    }
}

UPDATE:

You can also try this:

Database.SetInitializer<YourContextType>(new CreateDatabaseIfNotExists());