Raycynix.Extensions.Database.Sqlite 3.1.0

dotnet add package Raycynix.Extensions.Database.Sqlite --version 3.1.0
                    
NuGet\Install-Package Raycynix.Extensions.Database.Sqlite -Version 3.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Raycynix.Extensions.Database.Sqlite" Version="3.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raycynix.Extensions.Database.Sqlite" Version="3.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Raycynix.Extensions.Database.Sqlite" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Raycynix.Extensions.Database.Sqlite --version 3.1.0
                    
#r "nuget: Raycynix.Extensions.Database.Sqlite, 3.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Raycynix.Extensions.Database.Sqlite@3.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Raycynix.Extensions.Database.Sqlite&version=3.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Raycynix.Extensions.Database.Sqlite&version=3.1.0
                    
Install as a Cake Tool

Raycynix.Extensions.Database.Sqlite

This package follows the shared version in Directory.Build.props. See CHANGELOG.md for release history.

SQLite provider integration for Raycynix.Extensions.Database.

What It Provides

  • AddSqlite(...)
  • SqliteOptions
  • SQLite structured connection-string composition
  • SQLite provider-specific validation
  • EF Core UseSqlite(...) configuration with command timeout and migrations assembly support

The provider is selected by calling .AddSqlite(...).

Usage

Schema behavior

EF Core's SQLite provider does not support relational schemas. Explicit schema metadata from DatabaseSchema or EntitySchema is ignored in generated queries and table-creation SQL; for example, sales.orders is emitted as the unqualified table orders. There is no SqliteOptions.DefaultSchema option. Use .AddSqlite() without schema configuration. Different schema names do not isolate tables with the same name in SQLite.

Registration

builder.Services
    .AddRaycynixDatabase(builder.Configuration, options =>
    {
        options.EnsureCreated = true;
        options.UseMigrations = false;
    })
    .AddSqlite(sqlite =>
    {
        sqlite.CommandTimeoutSeconds = 30;
    });

Configuration

{
  "DatabaseOptions": {
    "ConnectionOptions": {
      "Name": "app.db"
    },
    "EnsureCreated": true,
    "UseMigrations": false,
    "SqliteOptions": {
      "Mode": "ReadWriteCreate",
      "Cache": "Shared",
      "CommandTimeoutSeconds": 30
    }
  }
}

When a raw ConnectionString is not supplied, structured SQLite configuration requires only Name, which becomes the SQLite data source.

Logging

The provider emits optional Microsoft.Extensions.Logging diagnostics for validation, connection-string source selection, and EF Core provider configuration. Connection strings and data source values are never logged.

Migrating From 2.x

  • Replace SqliteConfiguration with SqliteOptions.
  • Import it from Raycynix.Extensions.Database.Sqlite.Options.
  • Rename the section from DatabaseConfiguration:SqliteConfiguration to DatabaseOptions:SqliteOptions.
  • Invalid mode, cache, and negative command timeout values now fail during options validation.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Raycynix.Extensions 3.1.0. All packages inherit the shared version from Directory.Build.props. See https://github.com/raycynix/Raycynix.Extensions/blob/HEAD/src/Raycynix.Extensions.Database.Sqlite/CHANGELOG.md for package-specific changes and https://github.com/raycynix/Raycynix.Extensions/blob/HEAD/CHANGELOG.md for the release overview.