title: SQL Server Compact Code First: Database not created
body: <p>I want to use Entity Framework code first to create a SQL Server Compact DB. 
  I first created the model classes, then the DB context:</p>
  
  <pre><code>public class Peng_Rob_BinaryInteractions
  {
      [Key]
      public int PID { get; set; }
      public int ID1 { get; set; }
      public int ID2 { get; set; }
      public Nullable&lt;double&gt; Value { get; set; }
  }
  public class RefData
  {
      [Key]
      public int ID { get; set; }
      public Nullable&lt;double&gt; Mwt { get; set; }
      public Nullable&lt;double&gt; Tc { get; set; }
      public Nullable&lt;double&gt; Pc { get; set; }
      public Nullable&lt;double&gt; Omega { get; set; }
      public Nullable&lt;double&gt; Hoffset { get; set; }
      public Nullable&lt;double&gt; P1 { get; set; }
      public Nullable&lt;double&gt; P2 { get; set; }
      public Nullable&lt;double&gt; P3 { get; set; }
      public Nullable&lt;double&gt; P4 { get; set; }
      public Nullable&lt;double&gt; P5 { get; set; }
      public Nullable&lt;double&gt; P6 { get; set; }
      public Nullable&lt;double&gt; P7 { get; set; }
      public Nullable&lt;double&gt; TC_K { get; set; }
      public Nullable&lt;double&gt; PC_K { get; set; }
      public Nullable&lt;double&gt; Tr { get; set; }
      public Nullable&lt;double&gt; Ha_a { get; set; }
      public Nullable&lt;double&gt; Ha_b { get; set; }
      public Nullable&lt;double&gt; Ha_c { get; set; }
  
      public Nullable&lt;double&gt; Entropy_Offset { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>The <code>DbContext</code> class:</p>
  
  <pre><code>public class AddinDBContext : DbContext
  {
      public DbSet&lt;Peng_Rob_BinaryInteractions&gt; Peng_Rob_BinaryInteractions { set; get; }
      public DbSet&lt;RefData&gt; RefData { set; get; }
  
      static AddinDBContext()
      {
          Database.SetInitializer&lt;AddinDBContext&gt;(new DbInitializer());
          //using (AddinDBContext db = new AddinDBContext())
          //    db.Database.Initialize(false);
      }
  
      public static AddinDBContext Create()
      {
          return new AddinDBContext();
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          base.OnModelCreating(modelBuilder);
      }
  }
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>public class DbInitializer : DropCreateDatabaseAlways&lt;AddinDBContext&gt;{
      //Seed method here
  }
  </code></pre>
  
  <p>And inside the <em>app.config</em> file, I added the connection string:</p>
  
  <pre><code>&lt;add name="AddinDBContext" 
          connectionString="Data Source=D:\GTDB.sdf"
          providerName="System.Data.SqlServerCe.4.0" /&gt;
  </code></pre>
  
  <p>I debugged the code and there is no exception, but I can't find the database inside the d at all or any other place; the database is not created. What am I doing wrong?</p>