Turn off DB Initializer in Code-First:

You can also turn off the DB initializer of your application. Suppose, for the production environment, you don't want to lose existing data, then you can turn off the initializer, as shown in the following:

public class SchoolDBContext: DbContext 
    public SchoolDBContext() : base("SchoolDBConnectionString")
        //Disable initializer
    public DbSet<Student> Students { get; set; }
    public DbSet<Standard> Standards { get; set; }

You can also turn off the initializer in the configuration file, for example:

<?xml version="1.0" encoding="utf-8" ?>
    <add key="DatabaseInitializerForType SchoolDataLayer.SchoolDBContext, SchoolDataLayer"
            value="Disabled" />