Creating the SQL Server Database
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 the SQL Server database and add two tables to it. We do this as follows:
Open the
ExpenseTracker.Server\appsettings.json
file.Update the connection string to point to your instance of SQL Server and change the name of the database to
ExpenseTracker
:
Press + to interact
"ConnectionStrings": {"ExpenseTrackerServerContext": "Server=TOI-WORK\\SQLEXPRESS2019; Database=ExpenseTracker; Trusted_Connection=True; MultipleActiveResultSets=true"}
The preceding code assumes that our server is named ...