Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have an ASP .NET MVC application. "MovieDBContext" is a method of a controller that returns some basic information about a list of movies in a view. I know the database is working as I can enter new movies and delete them etc. using Code First and Entity Framework.

This is the web.config file connection settings.
<configuration>
  <connectionStrings>
    <add name="MovieDBContext"
        connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;database=MvcMovie;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
        providerName="System.Data.SqlClient" />
    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
  </connectionStrings>


I've looked in my list of databases in SQL Server Management Studio but it's not there. I've clicked on the App_Data file in the Visual Studio 2010 but that doesn't open up any databases. I've wanted a way to look at the data in the database other than through the program itself, preferably the management studio. Any ideas? :)
Posted
Updated 25-Nov-12 4:44am
v2

1 solution

Use this instead for the query string (will create a new database viewed in the management studio):

XML
<add name="MovieDBContext">
        connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;database=MvcMovie;
        providerName="System.Data.SqlClient" /></add>


Or press "Show all files" option before double clicking the App_Data in the Solution Explorer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900