/* */

Error after connecting database with MVC. Unable to delete the Database as in Use.

---rakesh Work on this,

When ever you connect your app with mvc and then later on if you try to delete the database it would give you an exception in db as unable to delete db as database is in use. 

So as to avoid that error 
Run this in SSMS;


use master
ALTER DATABASE g4dev SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DROP DATABASE G4Dev;
Previous
This is the oldest page
Thanks for your comment