DATA ACCESS FOR .NET

Fast, direct PostgreSQL access.
Built for .NET.

Use familiar ADO.NET connections and commands with pooling, PostgreSQL types, bulk COPY, notifications, and replication built into one provider.

DIRECT TO POSTGRESQL

Everything works together.

BlueTusk talks directly to PostgreSQL and does not hide another provider underneath.

01NetworkSockets, TLS, controlled memory use
02PostgreSQLDatabase messages and cancellation
03BlueTusk clientSessions, replication, batching
04ADO.NETConnection pools, commands, readers
05Your dataTypes, bulk COPY, notifications
CONNECT YOUR WAY

Secure connections, clearly configured.

Authentication guide
Connection featureWhat BlueTusk supportsWhat you control
CredentialsStatic values, callbacks, password files, and cloud token providersChoose where credentials come from; BlueTusk keeps them out of logs
TLSServer certificate checks and client certificatesChoose which certificates your application trusts
Multi-hostConnect to the right server and fail over between configured hostsChoose the required server role; BlueTusk verifies it
PoolingReusable connection pools with limits, reset, and health checksChoose pool size and whether session state can be retained
AuthenticationPassword, OAuth, Kerberos/SSPI, and supported legacy methodsThe server and selected login method determine what is available
POSTGRESQL TYPES

Use the database types you already rely on.

ScalarNumeric + moneyint · long · decimal

Values keep PostgreSQL precision and behavior.

StructuredArraysT[]

Supports one-dimensional and multidimensional PostgreSQL arrays.

StructuredRanges + multirangesRange<T>

Keeps inclusive, exclusive, empty, and unbounded ranges intact.

DocumentJSON / JSONBstring · JsonDocument

Text and binary paths with typed parameters.

Networkinet / cidr / macaddrIPAddress + values

Works with PostgreSQL network addresses as typed values.

Searchtsvector / tsquerytyped values

Use PostgreSQL full-text search values in ADO.NET and EF Core.

User-definedEnums + compositesregistered CLR types

Register your .NET types once when the data source is created.

Temporaldate / time / intervalDateOnly · TimeOnly

Infinity and interval structure preserve server behavior.

MORE THAN QUERIES

Bulk data, notifications, and replication are built in.

Use dedicated, tested APIs for high-volume and real-time database work.

FAMILIAR ADO.NET

Create one data source and reuse it.

This is the public 1.x API. Automated checks keep the packages, API reference, examples, and compatibility promises in sync.

Program.cs
var connectionString = Environment.GetEnvironmentVariable(
    "BLUETUSK_TEST_CONNECTION_STRING")
    ?? "Host=localhost;Username=postgres;Password=postgres";

await using var dataSource =
    new BlueTuskDataSourceBuilder(connectionString).Build();

await using var command = dataSource.CreateCommand(
    "SELECT $1::int4 + $2::int4");

command.Parameters.Add(new BlueTuskParameter<int>(20));
command.Parameters.Add(new BlueTuskParameter<int>(22));

var answer = await command.ExecuteScalarAsync<int>();