title: How to implement IDatabaseInitializer with SQL Server CE 4.0
body: <p>I'm new to EF Code First.</p>
  
  <p>I created a subclass of <code>DbContext</code> and added some <code>DbSets</code>.  </p>
  
  <p>I made subclass of <code>DropCreateDatabaseAlways&lt;MyContext&gt;</code> and implemented the following in the context, here is what my context looks like:</p>
  
  <pre><code>public class Context : DbContext
  {
    public Context() : base("Database") {  }
  
    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
      Database.DefaultConnectionFactory.CreateConnection("System.Data.SqlServerCe.4.0");
      Database.SetInitializer(new DatabaseInitializer());
    }
  
    public DbSet&lt;NameEntity&gt; Names { get; set; }
    public DbSet&lt;Case&gt; Cases { get; set; }
  }
  </code></pre>
  
  <p>After I run the following and check the apps files I don't see a generated database:</p>
  
  <pre><code>public App() //App ctor
  {
    using (Models.Context context = new Models.Context())
    {
  
    }
  }
  </code></pre>
  
  <p>What am I missing?</p>