For Entity Framework 5.0.0.0 - 6.1.3
You DO indeed want to do the following:
1. using System.Data.Entity; to startup file (console app --> Program.cs / mvc --> global.asax
2. Database.SetInitializer<YourDatabaseContext>(null);
Yes, Matt Frear is correct. UPDATE -EDIT: Caveat is that I agree with others in that instead of adding this code to global.asax added to your DbContext class
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
// other code
Database.SetInitializer<YOURContext>(null);
// more code here.
}
As others mentioned this also is good for handling the unit testing.
Currently I am using this with Entity Framework 6.1.3 /.net 4.6.1
I will come back to provide a CORE snippet in the near future.