c# - Where to look for DB file after update-database? -
i created domain classes , db tables representations using entity framework. using migrations seed method created init
data. in console window, use update-database
command create db , seed data. now, don't know find database file, , how attach in server explorer.
my app.config connection string looks
<configuration> <connectionstrings> <add name="mydbcontext" connectionstring="data source=.\sqlexpress;initial catalog=mydbcontext;integrated security=true;attachdbfilename=|datadirectory|mydbcontext.mdf" providername="system.data.sqlclient" /> </connectionstrings> </configuration>
i in app_data
folder, , tried attach db using server explorer, don't know browse add. i'm doing wrong here?
if understand correctly , looking physical location of files in sql server express 2008 r2 can find them here :
c:\program files\microsoft sql server\mssql10.sqlexpress\mssql\data
i not using sql server express myself number 10 might different you.
if want move app_data take @ :
http://www.codeproject.com/questions/441590/how-to-add-existing-database-in-app-data-folder-in
Comments
Post a Comment