Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddSqlite

Method
📦 CommunityToolkit.Aspire.Hosting.Sqlite v13.6.1
func (DistributedApplicationBuilder) AddSqlite(
name string,
options ...*AddSqliteOptions,
) SqliteResource

Signature

methodAddSqlitebuilder
Adds an Sqlite resource to the application builder.
AddSqlite(
name string,
options ...*AddSqliteOptions,
) SqliteResource
namestringThe name of the resource.
options...*AddSqliteOptionsOptional settings, described under Options.

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

DatabasePath*stringThe optional path to the database file. If no path is provided the database is stored in a temporary location.
DatabaseFileName*stringThe filename of the database file. Must include extension. If no file name is provided, a randomly generated file name is used.
SqliteResource

A resource builder for the Sqlite resource.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder