Edit

Share via


Aspire Community Toolkit PostgreSQL hosting extensions

Includes: Hosting integration included Hosting integration only — Client integration not included Client integration not included

Note

This integration is part of the Aspire Community Toolkit and isn't officially supported by the Aspire team.

In this article, you learn about the Aspire Community Toolkit PostgreSQL hosting extensions package which provides extra functionality to the Aspire PostgreSQL hosting package.

This package provides the following features:

Hosting integration

To get started with the Aspire Community Toolkit PostgreSQL hosting extensions, install the 📦 CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions NuGet package in the AppHost project.

dotnet add package CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions

For more information, see dotnet add package or Manage package dependencies in .NET applications.

Example usage

To add the DbGate management UI to your PostgreSQL resource, call the WithDbGate method on the PostgresServerResource instance.

var postgresServer = builder.AddPostgreSQL("PostgreSQL")
    .WithDbGate();

To add the Adminer management UI to your PostgreSQL resource, call the WithAdminer method on the PostgresServerResource instance.

var postgresServer = builder.AddPostgreSQL("PostgreSQL")
    .WithAdminer();

This will add a new resource to the AppHost which will be available from the Aspire dashboard.