title: MVC 4 - Database not initialized
body: <p>I recently restructured my MVC 4 Application and now face the problem that the database is not being initialized anymore.</p>
  
  <p>In Global.asax, I'm calling the initializer on first start this way:</p>
  
  <pre><code>Database.SetInitializer&lt;MyContext&gt;(new MyInitializer());
  new MyContext().Portfolios.Find(1);
  new MyContext().UserProfiles.Find(1);
  </code></pre>
  
  <p>MyInitializer contains a little seed method. </p>
  
  <pre><code>public class MyInitializer : CreateDatabaseIfNotExists&lt;MyContext&gt;
  {
      protected override void Seed(MyContext context)
      {
   ...
  </code></pre>
  
  <p>Initializer and Context are in namespace .DAL which I reference to in Global.asax. The Database is empty and I would expect it to be created, but it doesn't.</p>
  
  <p>It seems like the Initializer is not being called at all..it makes no difference if I set the Initializer to DropCreateDatabaseAlways and I don't get why. Does any of you have an idea or a good link?</p>