共用方式為


MongoDBBuilderExtensions.WithMongoExpress<T> Method

Definition

Adds a MongoExpress administration and development platform for MongoDB to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithMongoExpress<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource>>? configureContainer = default, string? containerName = default) where T : Aspire.Hosting.ApplicationModel.MongoDBServerResource;
static member WithMongoExpress : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.MongoDBServerResource)> * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.MongoDB.MongoExpressContainerResource>> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.MongoDBServerResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.MongoDBServerResource)
<Extension()>
Public Function WithMongoExpress(Of T As MongoDBServerResource) (builder As IResourceBuilder(Of T), Optional configureContainer As Action(Of IResourceBuilder(Of MongoExpressContainerResource)) = Nothing, Optional containerName As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The MongoDB server resource builder.

configureContainer
Action<IResourceBuilder<MongoExpressContainerResource>>

Configuration callback for Mongo Express container resource.

containerName
String

The name of the container (Optional).

Returns

A reference to the IResourceBuilder<T>.

Remarks

This version of the package defaults to the tag of the container image.

Applies to