SharpCoreDB.Functional.Linq2DB 2.1.0-RC.3

This is a prerelease version of SharpCoreDB.Functional.Linq2DB.
dotnet add package SharpCoreDB.Functional.Linq2DB --version 2.1.0-RC.3
                    
NuGet\Install-Package SharpCoreDB.Functional.Linq2DB -Version 2.1.0-RC.3
                    
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="SharpCoreDB.Functional.Linq2DB" Version="2.1.0-RC.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpCoreDB.Functional.Linq2DB" Version="2.1.0-RC.3" />
                    
Directory.Packages.props
<PackageReference Include="SharpCoreDB.Functional.Linq2DB" />
                    
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 SharpCoreDB.Functional.Linq2DB --version 2.1.0-RC.3
                    
#r "nuget: SharpCoreDB.Functional.Linq2DB, 2.1.0-RC.3"
                    
#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 SharpCoreDB.Functional.Linq2DB@2.1.0-RC.3
                    
#: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=SharpCoreDB.Functional.Linq2DB&version=2.1.0-RC.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SharpCoreDB.Functional.Linq2DB&version=2.1.0-RC.3&prerelease
                    
Install as a Cake Tool

SharpCoreDB.Functional.Linq2DB

linq2db adapter for SharpCoreDB.Functional.

Version: v1.9.5 (production-ready)
Package: SharpCoreDB.Functional.Linq2DB


Overview

SharpCoreDB.Functional.Linq2DB is the production-ready linq2db adapter for SharpCoreDB's functional stack. It delivers compile-time type safety, expressive LINQ, zero change-tracking overhead, and railway-oriented return types (Option<T>, Fin<T>, Seq<T>).

Perfect for:

  • ✅ High-throughput AI/agentic workflows and GraphRAG
  • ✅ Compile-time safe queries with full IntelliSense
  • ✅ Low memory/CPU overhead (no EF-style tracking)
  • ✅ Bulk operations via BulkCopyAsync
  • ✅ Native AOT and .NET 10/C# 14
  • ✅ Railway-oriented error handling (Fin<T>)

Installation

dotnet add package SharpCoreDB.Functional.Linq2DB --version 2.0.0.0

Quick Start (Production)

1. Basic LINQ (raw linq2db)

using SharpCoreDB.Functional.Linq2DB;
using LinqToDB;

var conn = new SharpCoreDBDataConnection("Data Source=./app.scdb");

var users = await conn.GetTable<User>()
    .Where(u => u.IsActive)
    .OrderBy(u => u.Email)
    .ToListAsync();
var db = new FunctionalLinq2DbContext(conn);

// Option<T> for safe lookups
var user = await db.FindOneAsync<User>(u => u.Email == "test@example.com");

// Seq<T> for collections
var activeUsers = await db.QueryAsync<User>(u => u.IsActive);

// Fin<T> for mutations (railway-oriented)
var insertResult = await db.InsertBatchAsync(new[] { user1, user2 }); // uses BulkCopyAsync internally

insertResult.IfSucc(count => Console.WriteLine($"Inserted {count} rows"))
            .IfFail(err => Console.WriteLine($"Error: {err.Message}"));

Connection note: Use "Data Source=..." for full linq2db/SQLite compatibility. SharpCoreDB "Path=..." works via the core provider but may require the underlying ADO.NET path for DDL.


Key Production Features

  • BulkCopy support in InsertBatchAsync for high-speed ingestion (GraphRAG, analytics)
  • Full type mapping (ULID as string, GUID as compact string, DateTime ISO, bool→int for SQLite compat)
  • Transaction support with TransactionAsync<TResult>
  • DeleteWhereAsync, CountAsync, ExistsAsync, GetAllAsync
  • Seamless with SharpCoreDB.Functional (Prelude, Option, Fin, Seq, Error)
  • Works alongside SharpCoreDB.Functional.Dapper and EF Core functional wrapper
  • Full API in FunctionalLinq2DbContext.cs and Extensions.cs
  • Test coverage: tests/SharpCoreDB.Functional.Linq2DB.Tests/
  • 🔗 SharpCoreDB GitHub

License: MIT

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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
2.1.0-RC.3 33 9/17/2026
2.0.0.3 88 9/12/2026
2.0.0.2 102 9/4/2026
2.0.0.1 90 9/1/2026
2.0.0 93 9/1/2026
2.0.0-preview.3 70 8/30/2026
2.0.0-preview.2 74 8/30/2026
2.0.0-preview.1 71 8/29/2026
1.9.9 104 8/30/2026
1.9.8 95 8/29/2026
1.9.3 123 7/29/2026

v2.1.0-RC.3 (2026-09-17): net11.0-only (C# 15 preview) release line - 2,897 tests green across 16 suites; the fixed-width inline capacity ships at 16 by default on both storage paths (batched multi-row INSERT measured +12 to +19 percent); the overflow arena writes a row's payloads in one append instead of one file open per value; and in-place UPDATE/DELETE with deferred index maintenance put the fixed-width fair-PK layout ahead of SQLite on UPDATE (0.8x) and DELETE (0.5x). Full details: https://github.com/MPCoreDeveloper/SharpCoreDB/blob/release/v2.1.0.0-RC.3/docs/CHANGELOG.md