CSharpDB.Client 2.0.1

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

CSharpDB.Client

CSharpDB.Client is the authoritative database API for CSharpDB.

It owns the public client contract used to talk to a database, while transport and lower-level implementation details stay behind that boundary.

Current Direction

  • CSharpDB.Client is now the real implementation layer for database access.
  • Direct, Http, and Grpc are implemented transports today.
  • NamedPipes remains the only future transport target.

Current Transport Model

Create the client with CSharpDbClientOptions:

var client = CSharpDbClient.Create(new CSharpDbClientOptions
{
    Transport = CSharpDbTransport.Direct,
    DataSource = "csharpdb.db"
});

The transport can be selected explicitly with Transport. If it is omitted, the client infers it from Endpoint and otherwise defaults to direct.

Direct resolution currently accepts:

  • Endpoint as a file path
  • Endpoint as file://...
  • DataSource
  • ConnectionString containing Data Source=...

Resolution rules:

  • direct is the default when transport cannot be inferred from a network endpoint
  • supplied direct inputs must resolve to the same target
  • http:// and https:// infer Http unless Transport = CSharpDbTransport.Grpc is set explicitly
  • pipe:// and npipe:// infer NamedPipes
  • Grpc uses http:// or https:// endpoints and talks to CSharpDB.Daemon
  • Http uses http:// or https:// endpoints and talks to CSharpDB.Api
  • NamedPipes still validates its endpoint shape and then fails with a not-implemented error
  • HttpClient is supported for both Http and Grpc

Example HTTP selection:

var client = CSharpDbClient.Create(new CSharpDbClientOptions
{
    Transport = CSharpDbTransport.Http,
    Endpoint = "http://localhost:61818"
});

This resolves to the dedicated CSharpDB.Api REST host.

Example gRPC selection:

var client = CSharpDbClient.Create(new CSharpDbClientOptions
{
    Transport = CSharpDbTransport.Grpc,
    Endpoint = "https://localhost:5001"
});

This resolves to the dedicated CSharpDB.Daemon gRPC host.

Supported Surface

The current ICSharpDbClient includes:

  • database info and data source metadata
  • tables, schemas, row counts, browse, and primary-key lookup
  • row insert, update, and delete
  • table and column DDL
  • indexes, views, and triggers
  • saved queries
  • procedures and procedure execution
  • SQL execution with multi-statement splitting
  • client-managed transaction sessions
  • document collections
  • checkpoint
  • storage diagnostics

Implementation Notes

  • The direct client depends on CSharpDB.Engine, CSharpDB.Sql, and CSharpDB.Storage.Diagnostics.
  • CSharpDB.Client does not reference CSharpDB.Data.
  • The HTTP transport runs against CSharpDB.Api and now covers the same public ICSharpDbClient surface as the direct client.
  • The gRPC transport uses generated protobuf RPC methods, not a generic JSON tunnel.
  • Dynamic values such as row cells, procedure args, and collection documents are carried through a recursive protobuf value contract that preserves blobs and nested objects.
  • The direct transport talks to the engine in-process, the HTTP transport uses JSON endpoints, and the gRPC transport uses the dedicated daemon host.
  • Internal tables such as __procedures, __saved_queries, and collection backing tables are hidden from normal table listing.

Dependency Injection

services.AddCSharpDbClient(new CSharpDbClientOptions
{
    DataSource = "csharpdb.db"
});

or

services.AddCSharpDbClient(sp => new CSharpDbClientOptions
{
    ConnectionString = "Data Source=csharpdb.db"
});

Design Rule

New database-facing functionality should be added here first.

Host-specific concerns should not create a second authoritative API beside CSharpDB.Client.

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 (2)

Showing the top 2 NuGet packages that depend on CSharpDB.Client:

Package Downloads
CSharpDB.Service

Deprecated compatibility facade over CSharpDB.Client for existing hosts. Planned for removal in v2.0.0.

CSharpDB

All-in-one package for CSharpDB application development. Includes the unified client, engine, ADO.NET provider, and diagnostics.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 33 3/14/2026
2.0.0 29 3/13/2026
1.9.0 49 3/12/2026
1.8.0 81 3/11/2026
1.7.0 87 3/8/2026