...

/

Creating the SQL Server Database

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:

  1. Open the ExpenseTracker.Server\appsettings.json file.

  2. 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 ...