MongoDBBuilderExtensions.AddMongoDB Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a MongoDB resource to the application model. A container is used for local development. This version the package defaults to the 7.0.8 tag of the mongo container image.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource> AddMongoDB (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, int? port = default);
static member AddMongoDB : Aspire.Hosting.IDistributedApplicationBuilder * string * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.MongoDBServerResource>
<Extension()>
Public Function AddMongoDB (builder As IDistributedApplicationBuilder, name As String, Optional port As Nullable(Of Integer) = Nothing) As IResourceBuilder(Of MongoDBServerResource)
Parameters
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
Returns
A reference to the IResourceBuilder<T>.
Applies to
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示