Skip to content
DocsTry Aspire
DocsTry

MongoDBServerResource.addDatabase

Method
📦 Aspire.Hosting.MongoDB v13.4.0
interface MongoDBServerResource {
// ... omitted for brevity
addDatabase(
name: string,
databaseName?: string): MongoDBDatabaseResource;
}

Signature

methodaddDatabasebuilder
Adds a MongoDB database to the application model.
addDatabase(
name: string,
databaseName?: string): MongoDBDatabaseResource
namestring
databaseNamestringoptional
MongoDBDatabaseResource

Defined on

This method is defined on the following type: