Aller au contenu

MongoDB hosting extensions

Ce contenu n’est pas encore disponible dans votre langue.

⭐ Community Toolkit MongoDB logo

The Aspire Community Toolkit MongoDB hosting extensions package provides extra functionality to the Aspire.Hosting.MongoDB hosting package.

This package provides the following features:

To get started with the Aspire Community Toolkit MongoDB hosting extensions, install the CommunityToolkit.Aspire.Hosting.MongoDB.Extensions NuGet package in the app host project.

Aspire CLI — Ajouter le package CommunityToolkit.Aspire.Hosting.MongoDB.Extensions
aspire add communitytoolkit-mongodb-extensions

La CLI Aspire est interactive ; choisissez le résultat approprié lorsque demandé :

Aspire CLI — Exemple de sortie
Select an integration to add:
> communitytoolkit-mongodb-extensions (CommunityToolkit.Aspire.Hosting.MongoDB.Extensions)
> Other results listed as selectable options...

To add the DbGate management UI to your MongoDB resource, call the WithDbGate method on the MongoDBResourceBuilder instance:

C# — AppHost.cs
var builder = DistributedApplication.CreateBuilder(args);
var mongodb = builder.AddMongoDB("mongodb")
.WithDbGate();
builder.AddProject<Projects.ExampleProject>()
.WithReference(mongodb);
// After adding all resources, run the app...

This adds a new DbGate resource to the app host which is available from the Aspire dashboard. DbGate is a comprehensive database management tool that provides a web-based interface for managing your MongoDB databases.

Questions & RéponsesCollaborerCommunautéDiscuterRegarder