Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddDatabase

Method
📦 CommunityToolkit.Aspire.Hosting.RavenDB v13.6.1
func (RavenDBServerResource) AddDatabase(
name string,
options ...*AddDatabaseOptions,
) RavenDBDatabaseResource

Signature

methodAddDatabasebuilder
Adds a database resource to an existing RavenDB server resource.
AddDatabase(
name string,
options ...*AddDatabaseOptions,
) RavenDBDatabaseResource
namestringThe name of the database resource.
options...*AddDatabaseOptionsOptional settings, described under Options.

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

DatabaseName*stringThe name of the database to create/add. Defaults to the same name as the resource if not provided.
EnsureCreated*boolIndicates whether the database should be created on startup if it does not already exist.
RavenDBDatabaseResource

A resource builder for the newly added RavenDB database resource.

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

Applies to

This method applies to the following types: