.NET Aspire sample application with several bells and whistles
Add the following packages to the AppHost project
- Aspire.Hosting.SqlServer
You will need to create a Parameter entry in the secrets.json file to provide the SQL Password used for creating the SQL Server container.
dotnet user-secrets set "Parameters:sql-password" "YourPassword"
The SQL Server port is hard-coded to 7890
but you could create another parameter and add the corresponding secrets value.
- Followed this tutorial: https://www.youtube.com/watch?v=UW6t9AXF6OA
- This is pre-.NET 9
- Uses a SQL Project to provide script for database creation
- https://www.youtube.com/watch?v=uIN7iEsRkS4
- This tutorial has no sound but shows how to add a SQL Server container and BindMount the scripts to initialize the database
- Copy the shell scripts to initialize the database from here