A full stack .NET 5 web app with Blazor frontend and webapi backend, using Microsoft SQL Server and Entity Framework as the ORM to manage database through migrations.
- navigate to server directory:
cd BlazorApp/Server
- rename the appsettings file
mv example.appsettings.json appsettings.json
- open appsettings.json
- add SQL Server name, DB name, and login params to the connection string:
{
"ConnectionStrings": {
"DefaultConnectionString": "Server=<your-db-server-name>; Initial Catalog=<your-db-name>; User ID=<user-name>; Password=<password>; Trusted_Connection=true;"
},
...
}
- finally:
dotnet watch run