You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started working with this sample (and, by the way, it appears to me to be one of the best sites for help with entity framework) and ran into the attach problem with the error message indicating it couldn't find the .ldf file. My solution, thanks to my daughter who happens to be ea DBA is to execute this code from within MS SQL Server Studio:
sp_attach_db @dbname= N'SchoolDB'
, @filename1= N'C:\Users\jblac\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\EF6-DBFirst-Demo\EF6DBFirstDemo\SchoolDB.mdf'
This was executed after right clicking on "New Query" in the toolbard, dropping the above code changed according to where you put the .mdf file and then selecting " Execute." This seems to me to be an easier solution than others that I looked at in the "closed issues" section and from searching online. I am using the pre-installed localdb (express) version running on windows 11.
The text was updated successfully, but these errors were encountered:
I just started working with this sample (and, by the way, it appears to me to be one of the best sites for help with entity framework) and ran into the attach problem with the error message indicating it couldn't find the .ldf file. My solution, thanks to my daughter who happens to be ea DBA is to execute this code from within MS SQL Server Studio:
sp_attach_db @dbname= N'SchoolDB'
, @filename1= N'C:\Users\jblac\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\EF6-DBFirst-Demo\EF6DBFirstDemo\SchoolDB.mdf'
This was executed after right clicking on "New Query" in the toolbard, dropping the above code changed according to where you put the .mdf file and then selecting " Execute." This seems to me to be an easier solution than others that I looked at in the "closed issues" section and from searching online. I am using the pre-installed localdb (express) version running on windows 11.
The text was updated successfully, but these errors were encountered: