title: ASP.NET MVC Initializer doesn't seed Database during Update-Database
body: <p>The tagged duplicate question uses a custom context, I'm using the default <code>ApplicationDbContext</code>.</p>
  
  <p>I'm confused why data isn't seeded whenever I run Update-Database. I read the other questions with answers but unfortunately they're using a custom Context, I'm using the default <code>ApplicationDbContext</code>. They seem to have the same answers but they don't work on my end.</p>
  
  <p>I have the following done;</p>
  
  <p>I have a custom Initializer:</p>
  
  <pre><code>public class PostInitializer : DropCreateDatabaseAlways&lt;ApplicationDbContext&gt;
  {
          protected override void Seed(ApplicationDbContext db)
          {
              var posts = new List&lt;Post&gt;
              {
                  new Post()
                  {
                      Content = "TestA"
                  },
                  new Post()
                  {
                      Content = "TestB"
                  }
              };
  
              posts.ForEach(p =&gt; db.Posts.Add(p));
              db.SaveChanges();
          }
  }
  </code></pre>
  
  <p>In My Global Asax:</p>
  
  <pre><code>public class MvcApplication : System.Web.HttpApplication
  {
          protected void Application_Start()
          {
              // call PostInitializer here
              Database.SetInitializer(new PostInitializer());
  
              AreaRegistration.RegisterAllAreas();
              FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
              RouteConfig.RegisterRoutes(RouteTable.Routes);
              BundleConfig.RegisterBundles(BundleTable.Bundles);
          }
  }
  </code></pre>
  
  <p>My Model:</p>
  
  <pre><code>public class Post
  {
       [Key]
       public int PostId { get; set; }
       public string Title { get; set; }
       public string Content { get; set; }
       public DateTime? DateTimeCreated { get; set; }
  }
  </code></pre>
  
  <p>I've tried deleting the DB and running Update-Database after, however data still isn't seeded.</p>