C#

Alan Mills
Alan Mills
20,877 Points

Is there a way to Create/Drop Databases in Visual Studio w/o firing up an installed instance of SQL Server MgmtSuite?

This question stems from the Entity Framework Basics course. As I'm executing DropCreateDatabaseAlways (per course), I'm required to end the task of SQL Server running on my computer. Even though, SSMS the application is not running on the foreground. If I don't end this task, I cannot drop the DB via visual studio script. I will get an error stating that the table is still in use. Does anybody have insight on what application setting I can investigate to resolve this headache ? Thanks !

1 Answer

Steven Parker
Steven Parker
116,264 Points

From inside VS, if you open the "Server Explorer" and then expand "Data Connections", when you right-click a database name one of the options should be "Delete".

Also, if you right-click on "Data Connections" itself, one of the options should be "Create New SQL Server Database...".