title: Seed method not called, Entity Framework 6
body: <p>I have a <code>DatabaseInitializer</code> class</p>
  
  <pre><code>public class DatabaseInitializer : CreateDatabaseIfNotExists&lt;DatabaseContext&gt;
  {
      protected override void Seed
          (
          DatabaseContext databaseContext
          )
      {
          // Seed the hash methods.
          var defaultHashMethod = new HashMethod
          {
              Description = "Default",
              CreateDate = DateTime.Now
          };
  
          databaseContext.HashMethod.Add(defaultHashMethod);
  
          databaseContext.SaveChanges();
      }
  }
  </code></pre>
  
  <p>In my DatabaseContext class I set the initializer</p>
  
  <pre><code>public DatabaseContext() : base("DatabaseContext")
  {
      InitializeDatabase();
  }
  
  private void InitializeDatabase()
  {
      Database.SetInitializer(new DatabaseInitializer());
      if (!Database.Exists())
      {
          Database.Initialize(true);
      }            
  }
  </code></pre>
  
  <p>As far as I can understand the seed method is only invoked once you perform an operation such as a query. My database is created successfully and I'm querying the table, but the seed method is never called.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>It seems like the problem is caused because of a class that is <code>inheriting</code> from my <code>DatabaseContext</code> class, when using this class to perform database operations, the seed method is not called. When using my <code>DatabaseContext</code> class, everything works as expected</p>
  
  <pre><code>public DbSet&lt;TestEntity&gt; TestEntity { get; set; }
  
  protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
      modelBuilder.Conventions.Remove&lt;PluralizingTableNameConvention&gt;();
  }
  </code></pre>