Skip to content
Docs Try Aspire
Docs Try

addDatabase

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

Signature

method addDatabase builder
Adds a PostgreSQL database to the application model.
addDatabase(
name: string,
databaseName?: string): PostgresDatabaseResource
name string
databaseName string optional
PostgresDatabaseResource

Applies to

This method applies to the following types: