You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Aspire framework does not currently support Neon, a modern, open-source serverless PostgreSQL-compatible database. It has managed integration for Azure as well. While it is possible to use the existing client integrations for PostgreSQL or Npgsql, Neon offers additional features like database branching that are not supported out of the box. We want to enable these unique features through dedicated .NET packages for Aspire.
Usage example
Here is an example of usage
Hosting Integration for Neon
To integrate open source Neon as a hosted resource in a .NET Aspire application:
Install the Aspire.Hosting.Neon NuGet package:
dotnet add package Aspire.Hosting.Neon
Add the Neon server resource in the app host project:
varbuilder=DistributedApplication.CreateBuilder(args);// Add Neon server resource with branching supportvarneon=builder.AddNeonProject("neon");// Add a Neon databasevarneonDb=neon.AddDatabase("neondb");// Reference the Neon database in a projectvarexampleProject=builder.AddProject<Projects.ExampleProject>().WithReference(neonDb);// Initialize and run the applicationbuilder.Build().Run();
Client Integration for Neon
To enable client projects to connect to Neon:
Install the Aspire.Neon NuGet package:
dotnet add package Aspire.Neon
Add the Neon client to the Program.cs file in the client project:
.NET Aspire issue link
dotnet/aspire#7118
Overview
The Aspire framework does not currently support Neon, a modern, open-source serverless PostgreSQL-compatible database. It has managed integration for Azure as well. While it is possible to use the existing client integrations for PostgreSQL or Npgsql, Neon offers additional features like database branching that are not supported out of the box. We want to enable these unique features through dedicated .NET packages for Aspire.
Usage example
Here is an example of usage
Hosting Integration for Neon
To integrate open source Neon as a hosted resource in a .NET Aspire application:
Install the
Aspire.Hosting.Neon
NuGet package:dotnet add package Aspire.Hosting.Neon
Add the Neon server resource in the app host project:
Client Integration for Neon
To enable client projects to connect to Neon:
Install the Aspire.Neon NuGet package:
dotnet add package Aspire.Neon
Add the Neon client to the Program.cs file in the client project:
Both integrations should align with Aspire's existing conventions and provide a similar experience to the PostgreSQL integration.
Additional context
We are looking for .NET Aspire experts from the community to help us in developing this integration. Let me know your feedback!
Help us help you
Yes, but only if others can assist
The text was updated successfully, but these errors were encountered: