Setting up SQL Server
Learn how to set up SQL Server with the Blazor WebAssembly app using a connection string.
We'll cover the following...
We need to create a new database on SQL Server and add a table to contain the tasks. We do this as follows:
- Open the
TaskManager.Server\appsettings.json
file. - Update the connection string to point to our instance of SQL Server and change
the name of the database to
TaskManager
:
Press + to interact
"ConnectionStrings": { "TaskManagerServerContext": "Server=TOI WORK\\ SQLEXPRESS2019; Database=TaskManager; Trusted_ Connection=True; MultipleActiveResultSets=true"}
The preceding code assumes ...