Get started with the SQL Server integrations
SQL Server is a relational database management system developed by Microsoft. The Aspire SQL Server integration lets you model a SQL Server instance and its databases as first-class resources in your AppHost, then hand the connection information to any consuming app — regardless of language.
Why use SQL Server with Aspire
Section titled “Why use SQL Server with Aspire”Adding SQL Server through Aspire — rather than wiring up containers and connection strings by hand — gives you:
- Zero-config local development. Aspire runs SQL Server from the
mcr.microsoft.com/mssql/servercontainer image with credentials generated automatically for you. - Consistent connection info across languages. Once you reference the database from a consuming app, Aspire injects connection properties as environment variables in a predictable format that works from C#, TypeScript, Python, Go, or any other language.
- Built-in health checks. The hosting integration automatically registers a health check so the dashboard and your orchestrator can tell when the server is ready.
- Dashboard observability. The database resource shows up in the Aspire dashboard with logs, status, and telemetry alongside your other services.
- A first-class C# client integration. C# apps can use the
Aspire.Microsoft.Data.SqlClientpackage for dependency injection, health checks, and OpenTelemetry, all wired up from the same resource name.
How the pieces fit together
Section titled “How the pieces fit together”The SQL Server integration has two sides: a hosting integration that you use in your AppHost to model the database resource, and a connection story for consuming apps that reference it.