Microsoft Dev Blogs

Exploring SQL Server Integration with .NET Aspire: A Collection of Hands-On Samples

thumbnail

Repository Overview

  • Simple SQL Server Integration: The simplest way to integrate SQL Server in Aspire without deploying a new database.
  • Aspire-Hosted SQL Server: SQL Server deployed and managed by Aspire inside an OCI container.
  • Aspire-Hosted SQL Server + DbUp: Database schema deployment using DbUp, fully automated via Aspire-orchestrated application.
  • Aspire-Hosted SQL Server + Database Project: Declarative database deployment approach using a Database Project, orchestrated by Aspire.
  • Aspire-Hosted SQL Server + DbUp + Data API Builder: Data API Builder (DAB) handling REST and GraphQL APIs, removing the need for manual API development.
  • End-To-End Jamstack “ToDo List”: Full-stack example combining Vue.js frontend, DAB backend, SQL Server database, and Node.js application orchestrated with Aspire.

Why It Matters

  • Faster Integration: Quick integration of SQL Server and Azure SQL with .NET Aspire.
  • Multiple Options: BYO SQL Server, Aspire-hosted containers, or declarative database projects.
  • Automated Provisioning: Database provisioning with DbUp, Database Projects, or EF Core migrations.
  • Zero-Code Backends: DAB enables instant REST and GraphQL APIs without manual development.
  • Full-Stack Orchestration: Aspire manages databases, APIs, and frontend applications for a seamless experience.

Get Started

  • Explore the repository here.
  • Try out the samples, find what suits your needs, and contribute or provide feedback as needed!