title: ASP.NET MVC 4 and EF5: how to use enable-migrations / update-database
body: <p>I seem to be getting problems using the basic features of enable-migrations and update-database. The project I have has migrations already enabled before I copied it over to a different PC.</p>
  
  <p>Am using VS 2010 Ultimate, SQL Server 2008 R2 Express, MVC 4 and EF5.</p>
  
  <p>In my Configuration class I have:</p>
  
  <pre><code>public Configuration()
  {
      AutomaticMigrationsEnabled = true;
  }
  
  protected override void Seed(RecruitDB.ModelContext.RecruitModelContext context)
  {
      context.Statuses.AddOrUpdate(
          s =&gt; s.ProgressStatus,
          new Status { ProgressStatus = "Interview Arranged" },
          new Status { ProgressStatus = "Candidate Rejected" },
          new Status { ProgressStatus = "Candidate Accepted" },
          new Status { ProgressStatus = "Job Offer Made" },
          new Status { ProgressStatus = "Job Offer Accepted" },
          new Status { ProgressStatus = "Job Offer Declined" }
          );
      // etc
  </code></pre>
  
  <p>In my web.config, I have EF setup to point to a database Recruitment.</p>
  
  <pre><code>&lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
  &lt;/entityFramework&gt;
  &lt;connectionStrings&gt;
      &lt;add name="RecruitModelContext" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Initial Catalog=Recruitment;Integrated Security=True;MultipleActiveResultSets=true" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Why would my database get created by the name of RecruitDB.ModelContext.RecruitModelContext?</p>
  
  <p>Is there some way to stop this from happening?</p>
  
  <p>I try to reset by using Enable-Migrations -Force and re-writing my Configuration file after it gets overwritten.</p>
  
  <p>Sometimes I get my correctly named Recruitment database and start using the application fine. Subsequently, I cannot get the Seed method to run.</p>
  
  <p>I end up having to delete the database and start over.</p>