My database is stored in an .mdf in App_Data and is functioning fine. My application can add, edit, delete records.
But the tables are invisible. When I open the Server Explorer and attach my .mdf and try to view the tables, there are none listed there. I attached the file to SQL Server Management Studio as well, but the only tables that show up there are those in the folder System Tables
.
From what I've been able to glean from the technobabble on MSDN this could be a permissions or ownership issue. I don't know about permissions, given that I'm able to connect to the database and query it and edit/delete records. So maybe ownership; I read somewhere that tables not owned by dbo
may not show. But if that's the case, I don't know what my application's ownership name is or how to make Management Studio or even Server Explorer show tables owned by other users.
Here's the connection string, in case the answer's in there:
<add name="EFDBContext" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=|DataDirectory|MLDatabase.mdf;Database=EFDbContext;User Instance=true" providerName="System.Data.SqlClient"/>
Thanks to anyone who might point me in the right direction!
ETA. this seems like a similar issue, but I don't know if the solution there would apply, since my database wasn't generated by scripts but by the Entity Framework (Code-First model).