Q:

How to Connect LocalDb to AppData Folder in ASP.NET MVC 5

I have SQL Server Express 2014 installed and I have created a table "MyStructures" that I would like to use with an ASP.NET MVC5 application. I can connect and view the database using "Server Explorer" in Visual Studio. Also I checked that the server is allowed to accept remote connections. Although I don't see why that would matter here because Visual Studio and the database are on the same machine and I am using Windows Authentication. 
When I right click on "App_Data" folder and add "New Database" I am getting an error that the is a problem connecting to the database. I am naming the new database file "MyStructures.mdf". How do I connect my web application to the local database? How can I add it to the "App_Data" folder?
In my Web.config file I have the following code...is this correct?
 <connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\MyStructures.mdf;Integrated Security=True"
  providerName="System.Data.SqlClient" />

A:

I found a workaround...I closed the connection to the database in Visual Studio. Then I connected to the database in SQL Management Studio. Then I right clicked on the "MyStructures" database and chose "Detach". After I detached the database I found the MyStructures.mdf file and copied it to the "App_Data" folder in Visual Studio. 

