title: Unable to update database to match the current model because there are pending changes and automatic migration is disabled
body: <p>I, for the life of me, can't get rid of this error message. I have tried almost everything that I can.</p>
  
  <p>MyDBContext.cs</p>
  
  <pre><code>        public MyDBContext() : base("ConnStr_Dev")
      {
  
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          Database.SetInitializer(new MigrateDatabaseToLatestVersion&lt;MyDBContext, DbMigrationsConfiguration&lt;MyDBContext&gt;&gt;());
          //Database.SetInitializer&lt;MyDBContext&gt;(null);
          base.OnModelCreating(modelBuilder);
      }
  </code></pre>
  
  <p>GenericRepository.cs</p>
  
  <pre><code>        public void Insert(T obj)
      {
          table.Add(obj);      //this is where it throws the error, inserting first time.
      }
  </code></pre>
  
  <p>Tried all of these in different combinations </p>
  
  <p>Enable-Migrations -EnableAutomaticMigrations -Force</p>
  
  <p>Add-migration Initial -IgnoreChanges</p>
  
  <p>Update-Database</p>
  
  <p>I have tried deleting the Migrations table, deleting the entire database, everything.</p>
  
  <p>Any Migrations experts please?</p>
  
  <p>Edit: the DAL contains the GenericRepository and the context class. </p>