Q&A

Get Started Using .NET Aspire with SQL Server & Azure SQL Database

Microsoft unveiled .NET Aspire at the Build 2024 developer conference, describing it as an opinionated, cloud-ready stack for building observable, production ready, distributed, cloud-native applications with .NET.

".NET Aspire brings together tools, templates, and NuGet packages that help you build distributed applications in .NET more easily," the company said. "Whether you're building a new application, adding cloud-native capabilities to an existing one, or are already deploying .NET apps to production in the cloud today, .NET Aspire can help you get there faster."

.NET Aspire
[Click on image for larger view.] .NET Aspire (source: Microsoft).

Since then, the company has been heavily pushing the new offering, whose key features include:

  • Orchestration: Enhances the local development experience by simplifying the management of your application's configuration and interconnections. It allows developers to specify the projects, containers, executables, and cloud resources that comprise the application, managing service discovery and connection string configurations automatically.
  • Integrations: Offers NuGet packages for commonly used services, such as Redis and PostgreSQL, with standardized interfaces ensuring consistent and seamless connections to your application. These integrations handle cloud-native concerns like health checks and telemetry, simplifying the setup process.
  • Tooling: Provides project templates and tooling experiences for Visual Studio, Visual Studio Code, and the .NET CLI, helping developers create and interact with .NET Aspire projects efficiently. These templates include boilerplate code and configurations common to cloud-native apps, such as telemetry and health checks.
  • Dashboard: Features a developer dashboard that offers a web-based interface to view details about the running application during development, including logs, distributed traces, and metrics, facilitating easier debugging and monitoring.

Redmond clearly sees this as the way forward for Azure development -- and maybe even other clouds -- so its experts have been making the rounds to educate Microsoft-centric developers.

And that will be the case in Las Vegas in March when two Microsoft experts explain all things .NET Aspire in the big Visual Studio Live! dev conference, which was recently described by Redmond as a "must-attend event" in that executives will helm keynote presentations and many sessions will feature fellow experts from the front lines.

In the latter camp are Davide Mauri, Principal Product Manager, and Jerry Nixon, Developer Evangelist, who will guide an intermediate-level session titled "Get Started Using .NET Aspire with SQL Server & Azure SQL Database."

This session is designed for .NET developers ready to get started with .NET Aspire using SQL Server and Azure SQL Database. With a focus on enterprise concerns, it promises that attendees will enhance their skills with the foundational knowledge and practical insights they need, leaning best practices and exploring real-world scenarios to effectively integrate and leverage these powerful tools in their solutions.

Specifically, attendees are promised to learn:

  • The Basics of .NET Aspire with SQL Server and Azure SQL Database
  • Best Practices for Enterprise Integration
  • How to Apply Practical Techniques through Real-World Scenarios

We caught up with Jerry to learn more about his upcoming session with Davide in a short Q&A.

VisualStudioMagazine: What inspired you to present a session on this topic?
Nixon: .NET Aspire is the first time in a long while we have seen prescriptive guidance from the .NET team, essentially telling developers that there is a best practice for building distributed applications -- and providing the tooling and support needed to ensure their projects succeed. Few solutions lack a database component, and since SQL Server on-premises and Azure SQL Database in the cloud are among the most capable and popular options for serious developers, we wanted to show the steps required to incorporate SQL into typical projects.

".NET Aspire is still relatively new, so as integration matures, helping developers understand the special steps required during this transition period can reduce frustration and friction during adoption."

Jerry Nixon, Developer Evangelist, Microsoft

As you know, .NET Aspire is still relatively new, so as integration matures, helping developers understand the special steps required during this transition period can reduce frustration and friction during adoption.

Inside the Session

What: Get Started Using .NET Aspire with SQL Server & Azure SQL Database

When: March 12, 2025, 4 p.m. - 5:15 p.m.

Who: Jerry Nixon, Developer Evangelist, Microsoft, and Davide Mauri, Principal Product Manager, Microsoft

Why: Discover best practices and explore real-world scenarios to effectively integrate and leverage these powerful tools in your solutions.

Find out more about VS Live! taking place March 10-14 at Paris Las Vegas Hotel & Casino

We've noticed Microsoft has been heavily pushing .NET Aspire in its dev tooling guidance lately, all over the place, so what's the big deal?
Best practices are really just proven practices. With millions of .NET developers, the .NET team has seen the trends and patterns that work -- and the ones that don't. Taking that experience and knowledge, in a way only the language team could, and translating it into coaching steps for developers wanting to ensure their work succeeds is not just neat; it's an incredible gift to our development community, enabling them to invest their energies in realistic solutions that deliver production quality and long-term value. It's worth pointing out that the biggest advantage of .NET Aspire is how it simplifies container-based development for C# developers looking to modernize their development loops and deployment strategies.

Briefly, what are the primary core components of .NET Aspire, and how do they enhance cloud-native development for .NET applications?
One of the most important components of .NET Aspire is its ability to incorporate complex systems and share references to those systems across resources. For example, adding a database is as simple as calling AddSqlServer(). No kidding -- that single command creates the container, downloads the image, spins up the container, creates internal accounts, and provides the connection information to consuming projects like Web API projects, website projects, or high-fidelity desktop projects. .NET Aspire abstracts away all this complexity, interacting with Docker Desktop on behalf of the developer and handling state, volumes, networking, and the myriad other details, making the development experience as simple as possible.

What capabilities specifically help data developers working with SQL Server and Azure SQL Database?
Azure SQL Database is packed with modern developer features that accelerate productivity and give architects more options than ever before. The same goes for SQL Server, especially the forthcoming SQL Server 2025. Incorporating these into your solution with .NET Aspire doesn't require cryptic or brittle steps. Instead, you can spin up the database, add a Data API builder endpoint using the Community Toolkit, and reference everything directly in your apps through transparent processes managed by the .NET Aspire orchestrator. Before you know it, developers can add sophisticated stored procedures, native JSON document handling, regular expressions for string values, and seamless integration with SQL Database projects, enabling database schema management and automation in source control.

Will you be discussing recommended security measures when using .NET Aspire with SQL Server and Azure SQL Database in enterprise environments?
Microsoft is one of the most security-conscious companies in the world. Every service, tool, and framework -- including .NET Aspire and SQL Server -- is secure by design and secure by default. This ensures solutions built on Microsoft platforms are not only more secure and less vulnerable but also more sophisticated. It's our responsibility to help developers understand how to integrate security into their development processes, deployment pipelines, and production systems. This session aims to clarify the security story, making it plug-and-play for developers rather than a major project milestone that requires extensive planning.

What resources would you recommend for developers to get up to speed with using .NET Aspire with SQL Server and Azure SQL Database in enterprise environments and prepare for your session?
I already mentioned Data API builder above; but it's is one of the most valuable tools a developer can incorporate in their solutions. It provides a secure and feature-rich Data API over SQL, Postgres, Azure Cosmos DB, or MySQL in any environment, including Azure, on-premises, and even AWS -- if that's what your company uses. The fact that Data API builder is free and open source, well, that's just gravy. I also hinted at SQL Data Projects, which are now SDK-style projects supported in Visual Studio, VS Code, and the command line through SqlPackage. These two tools make up a kind of dream team for data-oriented applications to manage, deploy, and easily expose data to clients, basically erasing -- for 90% of the applications out there -- the need for EF migrations, ORM tools, and custom Web API code, unit tests, and pipelines. Data API builder for Azure Databases and What are SQL database projects? are two of my favorite developer links.

The Last Takeaway
One takeaway I'd love developers to have is how much Microsoft continues to invest in the developer experience. My team in SQL is literally called the SQL Developer Experiences team, and we are constantly identifying and fixing developer pain points. Many recent features -- like calling REST endpoints from T-SQL and the new super-fast binary JSON data type -- are direct results of developers, not DBAs, asking for tools to solve real-world problems, and our eagerness to listen and respond. With so many innovations, we've compiled a Learning Path to help developers learn what these features are, how to use them, and why they're important.

We've also created a free Developer Applied Skill on Microsoft Learn, providing a special Azure environment where developers can gain hands-on experience and earn a managed credential from Microsoft to showcase on their resume, LinkedIn, or wherever they choose. Check it out here. It's a great way to pace your learning and ensure the pace of innovation doesn't get ahead of you. There are so many exciting things happening -- our love for developers is cranked to eleven these days, and it feels great to be part of this team.

Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. "Save $300 when you Register by the Super Early Bird savings deadline of Feb. 14," said the organizer of the event, which is presented by the parent company of Visual Studio Magazine.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Get Started Using .NET Aspire with SQL Server & Azure SQL Database

    Microsoft experts are making the rounds educating developers about the company's new, opinionated, cloud-ready stack for building observable, production ready, distributed, cloud-native applications with .NET.

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

Subscribe on YouTube