Tools & Ecosystem
CSharpDB provides 10+ ways to interact with your database — from embedded APIs to remote services, AI integrations, and visual tools.
Data Access Layers
Engine API (In-Process)
The Database class is the primary entry point for embedded use. It provides direct, high-performance, in-process access to the SQL engine and Collection API.
using CSharpDB.Engine;
public record User(string Name, string Email);
await using var db = await Database.OpenAsync("myapp.db");
await using var result = await db.ExecuteAsync("SELECT Name, Email FROM Users");
var users = await db.GetCollectionAsync<User>("users");
ADO.NET Provider
Standard DbConnection, DbCommand, DbDataReader, and DbTransaction implementations. Compatible with ORMs and data access libraries that use ADO.NET.
using CSharpDB.Data;
await using var conn = new CSharpDbConnection("Data Source=myapp.db");
await conn.OpenAsync();
await using var tx = await conn.BeginTransactionAsync();
await using var cmd = conn.CreateCommand();
cmd.Transaction = tx;
cmd.CommandText = "INSERT INTO Users VALUES (@id, @name)";
cmd.Parameters.Add(new CSharpDbParameter("@id", 1));
cmd.Parameters.Add(new CSharpDbParameter("@name", "Alice"));
await cmd.ExecuteNonQueryAsync();
await tx.CommitAsync();
Features: parameter binding, connection pooling, transaction support, type mapping.
Client SDK
A unified C# client with pluggable transports. Use the same ICSharpDbClient interface whether connecting locally, over HTTP, or via gRPC.
await using var client = CSharpDbClient.Create(new CSharpDbClientOptions
{
Transport = CSharpDbTransport.Direct,
DataSource = "myapp.db"
});
// Swap the transport to talk to a host instead:
// Transport = CSharpDbTransport.Http, Endpoint = "http://localhost:5000"
// Transport = CSharpDbTransport.Grpc, Endpoint = "https://localhost:5001"
var tables = await client.GetTableNamesAsync();
var result = await client.ExecuteSqlAsync("SELECT * FROM Users");
await client.ExecuteProcedureAsync(
"GetUser",
new Dictionary<string, object?> { ["id"] = 1 });
Hosting & Services
REST API
An ASP.NET Core Minimal API exposing 33+ endpoints across 13 groups. Includes OpenAPI/Swagger documentation with Scalar UI for interactive exploration.
| Endpoint Group | Description |
|---|---|
/api/tables | Table CRUD and schema inspection |
/api/rows | Row-level insert, update, delete |
/api/sql | Execute SQL statements |
/api/indexes | Index management |
/api/views | View management |
/api/triggers | Trigger management |
/api/procedures | Stored procedure CRUD and execution |
/api/collections | Collection API endpoints |
/api/pipelines | Pipeline management and execution |
/api/transactions | Explicit transaction control |
/api/schema | Full schema export |
/api/inspect | Storage diagnostics |
/api/maintenance | Vacuum, analyze, checkpoint, backup |
gRPC Daemon
A standalone gRPC service host (CSharpDB.Daemon) for remote client access. Enables multi-machine architectures with the same Client SDK interface used locally.
Developer Tools
CLI REPL
An interactive shell for executing SQL and inspecting databases from the terminal.
$ csharpdb myapp.db
CSharpDB CLI v2.3.0
csharpdb> SELECT * FROM Users;
┌────┬───────┬───────────────────┐
│ Id │ Name │ Email │
├────┼───────┼───────────────────┤
│ 1 │ Alice │ alice@example.com │
│ 2 │ Bob │ bob@example.com │
└────┴───────┴───────────────────┘
csharpdb> .tables
Users, Products, Orders
csharpdb> .schema Users
CREATE TABLE Users (Id INTEGER PRIMARY KEY, Name TEXT, Email TEXT)
csharpdb> .indexes
idx_users_email ON Users (Email)
csharpdb> .quit
Meta-commands: .tables, .schema, .indexes, .views, .triggers, .procedures, .read <file>, .snapshot, .quit
Admin UI (Blazor Server)
A full-featured web dashboard for database management and exploration.
| Tab | Description |
|---|---|
| Data | Browse tables with search, sort, filter, and inline CRUD |
| Query | SQL editor with syntax highlighting and results grid |
| Query Designer | Visual SQL builder with draggable table nodes, join lines, and live SQL preview |
| Procedures | Create, edit, and execute stored procedures |
| Pipeline Designer | Visual ETL editor with nodes, connections, properties panel, and execution controls |
| Storage | Disk inspection, page layout, and integrity analysis |
| Reports | Visual report designer with banded layouts, grouping, aggregates, and printable preview |
VS Code Extension
A NativeAOT-backed extension for Visual Studio Code with deep CSharpDB integration.
- Auto-connect to workspace
.dbfiles - Schema explorer — tables, columns, views, indexes, triggers, procedures
.csqlsyntax highlighting, completion, and hover help- Query results panel with export
- Data browser with CRUD for tables
- Table designer for schema editing
- Storage diagnostics viewer
AI Integration
MCP Server (Model Context Protocol)
A Model Context Protocol server exposing 15+ tools for AI assistants. Works with Claude Desktop, Cursor, VS Code Copilot, LM Studio, and other MCP-compatible clients.
| Tool Category | Tools |
|---|---|
| Schema | Inspect tables, columns, indexes, views |
| SQL | Execute queries and statements |
| Data | Browse rows, filter, iterate |
| Mutations | Insert, update, delete rows |
Cross-Platform
Native FFI (NativeAOT)
A C library compiled with NativeAOT for cross-language interop. Enables CSharpDB usage from Python, Node.js, Go, Rust, Swift, Kotlin, Dart, and other languages via FFI.
Node.js Package
A TypeScript/JavaScript wrapper around the native library using koffi for FFI binding. Brings CSharpDB to the Node.js ecosystem.