Sylin.Koan.Data.Connector.Sqlite 0.21.0

dotnet add package Sylin.Koan.Data.Connector.Sqlite --version 0.21.0
                    
NuGet\Install-Package Sylin.Koan.Data.Connector.Sqlite -Version 0.21.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="Sylin.Koan.Data.Connector.Sqlite" Version="0.21.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Data.Connector.Sqlite" Version="0.21.0" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Data.Connector.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 Sylin.Koan.Data.Connector.Sqlite --version 0.21.0
                    
#r "nuget: Sylin.Koan.Data.Connector.Sqlite, 0.21.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 Sylin.Koan.Data.Connector.Sqlite@0.21.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=Sylin.Koan.Data.Connector.Sqlite&version=0.21.0
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Data.Connector.Sqlite&version=0.21.0
                    
Install as a Cake Tool

Sylin.Koan.Data.Connector.Sqlite

SQLite is Koan's embedded relational reference adapter. It supports the ordinary Entity experience for a managed store and the same compact source experience for external or legacy files.

Install

dotnet add package Sylin.Koan.Data.Connector.Sqlite

For an application-owned store, reference the package and use the normal bootstrap:

builder.Services.AddKoan();

var todo = await new Todo { Title = "Ship" }.Save();
var open = await Todo.Query(item => !item.Done, ct);

The zero-configuration target is .koan/data/Koan.sqlite. SQLite creates it on first elected use; merely loading the connector does not touch disk. File, private-memory, and named shared-memory connection strings are supported.

Inspect and name useful reads

Use provider-neutral storage vocabulary to see what a source contains:

var source = Data.Source("Legacy");
var page = await source.Inspect().Containers(100, ct: ct);
var customer = await source.Inspect().Resolve(StorageAddress.From("CUSTOMER"), ct);
var shape = await source.Inspect().Describe(customer, ct);
var sample = await source.Inspect().Sample(customer, 20, ct);

Give reusable SQL a business name in the one application composition call. Opaque SQL requires a configured read lane; SQLite enforces it with PRAGMA query_only = ON on the selected lane connection.

builder.Services.AddKoan(koan =>
{
    koan.Data.Source("Legacy").Query("customers.active", query => query
        .Lane("Reports")
        .Sql("select CUSTOMER_NO as Id, DISPLAY_NM as Name from CUSTOMER where ACTIVE = @active")
        .Parameter<bool>("active"));

    koan.Data.Source("Legacy").Scalar<long>("customers.count", query => query
        .Lane("Reports")
        .Sql("select count(*) from CUSTOMER"));
});

var active = await Data.Source("Legacy").Query("customers.active", new { active = true }, ct);
var count = await Data.Source("Legacy").Scalar<long>("customers.count", ct);

Map a legacy shape

One compiled map drives hydration, writes, identity predicates, filters, sorts, batches, and schema validation:

builder.Services.AddKoan(koan =>
    koan.Data.Source("Legacy").Map<Customer>(map => map
        .Container("CUSTOMER")
        .Key(customer => customer.Id).Name("CUSTOMER_NO")
        .Property(customer => customer.Name.Full).Name("DISPLAY_NM")
        .Property(customer => customer.Profile).Object("PROFILE_JSON")));

using (EntityContext.Source("Legacy"))
{
    var customer = await Customer.Get(7, ct);
    customer!.Name.Full = "Updated";
    await customer.Save(ct);
}

Supported shapes are identity plus whole object, flat physical names, mixed scalar/object values, and logical properties backed by nested structured paths. Composite and provider-generated identities are supported. Nested path updates preserve unrelated JSON properties.

Set StorageLifecycle: External to prohibit physical shape mutation. Set Access: ReadOnly to reject every Entity write before provider I/O. An explicit map pins its declared container, so combining it with an ambient partition rejects rather than silently sharing that container.

See TECHNICAL.md for guarantees and limits.

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.

Version Downloads Last Updated
0.21.0 36 7/30/2026
0.20.8 101 7/23/2026
0.20.6 100 7/22/2026
0.20.4 147 7/21/2026
0.17.0 119 6/12/2026
0.8.0 107 5/16/2026