CSharpDB.Client
1.7.0
Prefix Reserved
dotnet add package CSharpDB.Client --version 1.7.0
NuGet\Install-Package CSharpDB.Client -Version 1.7.0
<PackageReference Include="CSharpDB.Client" Version="1.7.0" />
<PackageVersion Include="CSharpDB.Client" Version="1.7.0" />
<PackageReference Include="CSharpDB.Client" />
paket add CSharpDB.Client --version 1.7.0
#r "nuget: CSharpDB.Client, 1.7.0"
#:package CSharpDB.Client@1.7.0
#addin nuget:?package=CSharpDB.Client&version=1.7.0
#tool nuget:?package=CSharpDB.Client&version=1.7.0
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.Clientis now the real implementation layer for database access.CSharpDB.Serviceis a compatibility facade over the client while the repo retires direct service usage.- The current transport implementation is direct/local.
Http,Grpc,Tcp, andNamedPipesare part of the public client transport model, but onlyDirectis implemented today.
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:
Endpointas a file pathEndpointasfile://...DataSourceConnectionStringcontainingData 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://andhttps://inferHttpunlessTransport = CSharpDbTransport.Grpcis set explicitlytcp://,pipe://, andnpipe://infer their corresponding future transportHttp,Grpc,Tcp, andNamedPipesvalidate their endpoint shape and then fail with a not-implemented error for nowHttpClientis reserved for futureHttpandGrpctransports
Example gRPC selection:
var client = CSharpDbClient.Create(new CSharpDbClientOptions
{
Transport = CSharpDbTransport.Grpc,
Endpoint = "https://localhost:5001"
});
This currently fails with a transport-not-implemented error because the repo does not yet expose a gRPC server transport.
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, andCSharpDB.Storage.Diagnostics. CSharpDB.Clientdoes not referenceCSharpDB.Data.- Schema, data, procedure, and saved-query operations all run through direct engine access.
- Collection access and client-managed transaction sessions use direct engine instances.
- 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 | Versions 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. |
-
net10.0
- CSharpDB.Engine (>= 1.7.0)
- CSharpDB.Sql (>= 1.7.0)
- CSharpDB.Storage.Diagnostics (>= 1.7.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CSharpDB.Client:
| Package | Downloads |
|---|---|
|
CSharpDB.Service
Thread-safe service layer for hosting CSharpDB in ASP.NET Core, Blazor, or MCP server applications. |
|
|
CSharpDB
All-in-one package for CSharpDB application development. Includes the unified client, engine, ADO.NET provider, service layer, and diagnostics. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.7.0 | 31 | 3/8/2026 |