SqliteResourceBuilderExtensions Methods
ClassMethods2 members
Provides extension methods for adding Sqlite resources to an application builder.
AddSqlite(IDistributedApplicationBuilder, string, string?, string?) Section titled AddSqlite(IDistributedApplicationBuilder, string, string?, string?)extensionIResourceBuilder<SqliteResource> Adds an Sqlite resource to the application builder.
public static class SqliteResourceBuilderExtensions{ public static IResourceBuilder<SqliteResource> AddSqlite( this IDistributedApplicationBuilder builder, string name, string? databasePath = null, string? databaseFileName = null) { // ... }}Parameters
builderIDistributedApplicationBuilder The application builder.namestringThe name of the resource.databasePath string?optionalThe optional path to the database file. If no path is provided the database is stored in a temporary location.databaseFileName string?optionalThe filename of the database file. Must include extension. If no file name is provided, a randomly generated file name is used.Returns
IResourceBuilder<SqliteResource> A resource builder for the Sqlite resource.WithSqliteWeb(IResourceBuilder<SqliteResource>, Action<IResourceBuilder<SqliteWebResource>>, string?) Section titled WithSqliteWeb(IResourceBuilder<SqliteResource>, Action<IResourceBuilder<SqliteWebResource>>, string?)extensionIResourceBuilder<SqliteResource> Adds an Sqlite Web resource to the resource builder, to allow access to the Sqlite database via a web interface.
public static class SqliteResourceBuilderExtensions{ public static IResourceBuilder<SqliteResource> WithSqliteWeb( this IResourceBuilder<SqliteResource> builder, Action<IResourceBuilder<SqliteWebResource>>? configureContainer = null, string? containerName = null) { // ... }}Parameters
builderIResourceBuilder<SqliteResource> The resource builder.configureContainer Action<IResourceBuilder<SqliteWebResource>> optionalCallback to configure SqliteWeb container resource.containerName string?optionalThe optional name of the container.Returns
IResourceBuilder<SqliteResource> A resource builder for the Sqlite resource.Remarks
This overload is not available in polyglot AppHosts. Use
SqliteResourceBuilderExtensions.WithSqliteWebForPolyglot instead.