title: Database in use error with Entity Framework 4 Code First
body: <p>I have an MVC3 and EF 4 Code First application, which is configured to change the DB when the model changes, by setting the DB Initializer to a <code>DropCreateDatabaseIfModelChanges&lt;TocratesDb&gt;</code>, where <code>TocratesDb</code> is my derived <code>DbContext</code>.</p>
  
  <p>I have now made a change to the model, by adding properties to a class, but when EF tries to drop and recreate the DB, I get the following error:</p>
  
  <pre><code>Cannot drop database "Tocrates" because it is currently in use.
  </code></pre>
  
  <p>I have absolutely no other connections anywhere open on this database.  I assume that my cDbContext still has an open connection to the database, but what can I do about this?</p>
  
  <p><strong>NEW:</strong> Now my problem is how to re-create the database based on the model.  By using the more general IDatabaseInitializer, I lose that and have to implement it myself.  </p>