addDatabase

Method
📦 Aspire.Hosting.Azure.Sql v17.0.0
interface AzureSqlServerResource {
// ... omitted for brevity
addDatabase(
name: string,
databaseName?: string): AzureSqlDatabaseResource;
}

Signature

methodaddDatabasebuilder
Adds an Azure SQL Database to the application model. The Free Offer option will be used when deploying the resource in Azure
addDatabase(
name: string,
databaseName?: string): AzureSqlDatabaseResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
databaseNamestringoptionalThe name of the database. If not provided, this defaults to the same value as `name`.
AzureSqlDatabaseResource

Applies to

This method applies to the following types: