title: Cannot drop database because it is currently in use - EF code-first
body: <p>In my configuration I have this: </p>
  
  <pre><code>public sealed class Configuration : DbMigrationsConfiguration&lt;App.Repository.NogginatorDbContext&gt;
  {
      public Configuration()
      {
          AutomaticMigrationsEnabled = true;
      }
  
      protected override void Seed(AppDbContext context)
      {
          SqlConnection.ClearAllPools();
          //context.Database.CreateIfNotExists();
          System.Data.Entity.Database.SetInitializer(new DropCreateDatabaseAlways&lt;AppDbContext&gt;());
  
          if (!WebMatrix.WebData.WebSecurity.Initialized)
          {
              WebSecurity.InitializeDatabaseConnection("TestConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
          }
       }
   }
  </code></pre>
  
  <p>This is used for a test db that <em>should</em> drop and recreate every time.  Though when I hit "update-database" from the package manager console, even if the database is deleted manually prior to running, I get: </p>
  
  <blockquote>
    <p>Cannot drop database "Nogginator.Test" because it is currently in use.</p>
  </blockquote>
  
  <p>My connection string: </p>
  
  <pre><code>&lt;add name="TestConnection" 
       providerName="System.Data.SqlClient" 
       connectionString="Data Source=.\;Initial Catalog=App.Test;Trusted_Connection=True;MultipleActiveResultSets=True;" /&gt;
  </code></pre>
  
  <p>Why would this be happening?  </p>