共用方式為


AzureCosmosExtensions.AddDatabase Method

Definition

Adds a database to the associated Cosmos DB account resource.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> AddDatabase (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> builder, string databaseName);
static member AddDatabase : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource>
<Extension()>
Public Function AddDatabase (builder As IResourceBuilder(Of AzureCosmosDBResource), databaseName As String) As IResourceBuilder(Of AzureCosmosDBResource)

Parameters

builder
IResourceBuilder<AzureCosmosDBResource>

AzureCosmosDB resource builder.

databaseName
String

Name of database.

Returns

A reference to the IResourceBuilder<T>.

Applies to