I have a test application running on ASP.NET Core 3.2
Blazor.
I need to publish the site to a staging url for first stage testing. For this test I want to keep the application running on the same localdb files uses in development.
the connection string for the database locally is
Server=(localdb)\\mssqllocaldb;Database=MyDatabase;Trusted_Connection=True;MultipleActiveResultSets=true
The files for the database are stored currently in C:\Users\{username}\MyDatabase.mdf
(along with the _log.ldf
file).
How can I move this into the publish process with Visual Studio please? Do I need to relocate the file to the project directory and publish this way? Equally how do I then setup the server to know the database is stored in the project folder?