SharpCoreDB.Client 1.5.0

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

SharpCoreDB.Client v1.5.0 - .NET Client Library

ADO.NET-Style Client for SharpCoreDB Network Server

High-performance .NET client library for connecting to SharpCoreDB.Server with familiar ADO.NET patterns.

๐Ÿš€ Key Features

โœ… ADO.NET-Style API - Familiar patterns for .NET developers
โœ… Full Async/Await - Modern C# 14 async patterns
โœ… gRPC Protocol - High-performance primary protocol
โœ… Connection Pooling - Efficient connection reuse
โœ… Type Safety - Strong typing throughout
โœ… Transaction Support - BEGIN, COMMIT, ROLLBACK
โœ… Parameter Binding - SQL injection protection
โœ… Connection Strings - Standard connection string format

๐Ÿ“ฆ Installation

dotnet add package SharpCoreDB.Client

๐Ÿ’ป Quick Start

using SharpCoreDB.Client;

// Connect to SharpCoreDB server
await using var connection = new SharpCoreDBConnection(
    "Server=localhost;Port=5001;Database=mydb;SSL=true;Username=admin;Password=***"
);
await connection.OpenAsync();

// Execute query
await using var command = new SharpCoreDBCommand("SELECT * FROM users WHERE age > @age", connection);
command.Parameters.Add("@age", 21);

await using var reader = await command.ExecuteReaderAsync();
while (await reader.ReadAsync())
{
    Console.WriteLine($"Name: {reader["name"]}, Age: {reader["age"]}");
}

๐Ÿ”— API Reference

SharpCoreDBConnection

// Connection string format
var connectionString = "Server=localhost;Port=5001;Database=mydb;SSL=true;Username=admin;Password=***";
var connection = new SharpCoreDBConnection(connectionString);

// Open/close
await connection.OpenAsync();
await connection.CloseAsync();

// Properties
string serverVersion = connection.ServerVersion;
string sessionId = connection.SessionId;
ConnectionState state = connection.State;

// Ping server
TimeSpan latency = await connection.PingAsync();

SharpCoreDBCommand

var command = new SharpCoreDBCommand("INSERT INTO users (name, age) VALUES (@name, @age)", connection);

// Parameters (SQL injection protection)
command.Parameters.Add("@name", "Alice");
command.Parameters.Add("@age", 30);

// Execute methods
var reader = await command.ExecuteReaderAsync();
int affected = await command.ExecuteNonQueryAsync();
object scalar = await command.ExecuteScalarAsync();

SharpCoreDBDataReader

await using var reader = await command.ExecuteReaderAsync();

while (await reader.ReadAsync())
{
    // Access by name
    string name = reader.GetString("name");
    int age = reader.GetInt32("age");
    
    // Or by index
    var value = reader[0];
    
    // Check for null
    bool isNull = reader.IsDBNull(1);
}

๐Ÿ” Connection String Options

Parameter Description Required Default
Server Server hostname or IP Yes -
Port gRPC port No 5001
Database Database name No master
SSL Enable TLS/SSL No true
Username Authentication username No -
Password Authentication password No -
Timeout Connection timeout (seconds) No 30
PreferHttp3 Use HTTP/3 if available No false

๐Ÿ“Š Performance

  • Connection Pooling - Automatic connection reuse
  • Sub-millisecond Latency - 0.8-1.2ms query latency
  • Zero-Copy Operations - gRPC streaming optimization
  • Minimal Allocations - C# 14 performance features

๐Ÿ”„ Transaction Support

await using var connection = new SharpCoreDBConnection(connectionString);
await connection.OpenAsync();

// Begin transaction
await using var transaction = await connection.BeginTransactionAsync();

try
{
    // Execute commands in transaction
    await using var cmd1 = new SharpCoreDBCommand("INSERT INTO users ...", connection);
    await cmd1.ExecuteNonQueryAsync();
    
    await using var cmd2 = new SharpCoreDBCommand("UPDATE users ...", connection);
    await cmd2.ExecuteNonQueryAsync();
    
    // Commit
    await transaction.CommitAsync();
}
catch
{
    // Rollback on error
    await transaction.RollbackAsync();
    throw;
}

๐Ÿงช Testing Support

// Mock-friendly interfaces
public interface ISharpCoreDBConnection : IAsyncDisposable
{
    Task OpenAsync(CancellationToken cancellationToken = default);
    Task<ISharpCoreDBCommand> CreateCommandAsync(string sql);
    // ...
}

๐ŸŒ Multi-Language Support

Python Client:

pip install pysharpcoredb

JavaScript/TypeScript:

npm install @sharpcoredb/client

๐Ÿ“š Documentation

Client Guide: https://github.com/MPCoreDeveloper/SharpCoreDB/blob/master/docs/server/CLIENT_GUIDE.md

Server Setup: https://github.com/MPCoreDeveloper/SharpCoreDB/blob/master/docs/server/QUICKSTART.md

Full Documentation: https://github.com/MPCoreDeveloper/SharpCoreDB

๐Ÿ† Why SharpCoreDB.Client?

โœ… Familiar API - ADO.NET patterns you already know
โœ… Modern C# 14 - Latest language features
โœ… High Performance - gRPC protocol, connection pooling
โœ… Type Safe - Strong typing throughout
โœ… Production Ready - Tested with 1,468+ tests
โœ… Async First - Full async/await support

  • SharpCoreDB.Server - Network database server
  • SharpCoreDB - Core embedded database engine
  • SharpCoreDB.Analytics - Advanced analytics functions
  • SharpCoreDB.VectorSearch - Vector search capabilities

๐Ÿ“„ License

MIT License - See https://github.com/MPCoreDeveloper/SharpCoreDB/blob/master/LICENSE


Version: 1.5.0 | Release Date: March 8, 2026 | Status: โœ… Production Ready

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
1.5.0 80 3/14/2026