AddDatabase

Method
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.6.1
func (SurrealDbNamespaceResource) AddDatabase(
name string,
options ...*AddDatabaseOptions,
) SurrealDbDatabaseResource

Signature

methodAddDatabasebuilder
Adds a SurrealDB database resource to the application model
AddDatabase(
name string,
options ...*AddDatabaseOptions,
) SurrealDbDatabaseResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddDatabaseOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddDatabaseOptions argument.

DatabaseName*stringThe name of the database. If not provided, this defaults to the same value as name.
SurrealDbDatabaseResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: