Skip to content
DocsTry Aspire
DocsTry

addDatabase

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

Signature

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

Applies to

This method applies to the following types: