addDatabase

Method
📦 Aspire.Hosting.SqlServer v17.0.0
interface SqlServerServerResource {
// ... omitted for brevity
addDatabase(
name: string,
databaseName?: string): SqlServerDatabaseResource;
}

Signature

methodaddDatabasebuilder
Adds a SQL Server database resource
addDatabase(
name: string,
databaseName?: string): SqlServerDatabaseResource
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`.
SqlServerDatabaseResource

Applies to

This method applies to the following types: