1

I am following the instructions (at https://msdn.microsoft.com/en-gb/data/jj193542.aspx) for creating a new database from code. It creates the database, and I can retrieve data from it. The only problem is I don't know where the database is.

When I look in the SQL Server Object Explorer it lists only the (localdb) instance and that has only the system database.

I have tried the server explorer. When I connect to (localdb)\v11.0 it exists but doesn't have a database with my tables in it. When I try .\SQLEXPRESS it says the instance is not installed.

How can I determine what database the entity framework has created?

My app.Config is:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="mssqllocaldb" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
</configuration>
Paul Richards
  • 1,181
  • 1
  • 10
  • 29

0 Answers0