title: SQLException can't delete database [database_name]
body: <p>Some time when I run my c# mvc web-project </p>
  
  <p><strong>SQLException  can't delete  database [database_name] . [database_name] is in Use</strong><br>
  on the line where I am try to retrieve my data from DBContextex Object . But the error is obsoleted when I deleted the database and restarting  the project . It is happening suddenly . After happening the error I restarted the project again then error still exist when ever I deleted the database and restart .
  Suppose controller Action has following line</p>
  
  <pre><code>List&lt;entityname&gt; listent=new DbContext().entitynames.toList();
  </code></pre>
  
  <p>is executing then I am geeting the error on the following line . 
  I have a database Initializer also.</p>
  
  <p>What may be the problem ?  </p>