.NET Aspire 13: Create table and add seed data to SQL Server database on creation
Authorised Territory demonstrates how to add a SQL Server database as a resource in .NET Aspire 13.2, then override the default database creation SQL script so it creates a table and inserts seed data during database provisioning.
Full summary based on transcript
What the video covers
- Adding a SQL Server database as a resource in a .NET Aspire 13.2 application.
- Overriding the SQL script used during database creation.
- Creating a table and inserting seed data as part of the initial provisioning.
Prerequisites
- Docker Desktop must be running before starting the AppHost project.
- The AppHost project is started from Visual Studio 2026.
Database provisioning customization
- The presenter shows how the default database creation script can be replaced/overridden.
- The overridden script is used to:
- Create a table in the SQL Server database.
- Insert seed data into that table during creation.