ClickHouse/clickhouse-cs

Official .NET client for ClickHouse DB

C#

94

1,318 commits

updated Sep 25, 2026

See the code

README

ClickHouse C# client


NuGet Version NuGet Downloads

About

Official C# client for ClickHouse. The ClickHouse.Driver NuGet package contains two clients:

  • HTTP client: ClickHouseClient and an ADO.NET provider for ORMs. It sends data in the RowBinary format over HTTP(S). Use it for most applications.
  • Native TCP client (experimental): ClickHouseTcpClient. It uses the ClickHouse native protocol and sends data in columnar blocks.

Documentation

Full documentation is on the ClickHouse website:

Usage examples

We have a wide range of examples, aiming to cover typical scenarios of client usage. They are grouped by client: HTTP and native TCP.

Choosing a client

HTTPNative TCP
StatusStableExperimental. The API can change in a future release.
Main APIClickHouseClient, ADO.NET (ClickHouseConnection)ClickHouseTcpClient
.NET versions6.0 and newer8.0 and newer
Default ports8123 (HTTP), 8443 (HTTPS)9000, 9440 (TLS)
PerformanceFastEven faster: about 2x for typical reads and 1.5x for writes
ADO.NET and ORMs (Dapper, EF Core, linq2db)YesNo
CSV, JSONEachRow, Parquet, and raw streamsYesNo
JSON performanceBetter: binary transferText transfer only
Bearer authentication and custom HTTP headersYesNo
Columnar block readsNoYes
Progress, profile, and server log callbacksNoYes
W3C trace context propagation to ClickHouseNoYes

The overview gives more information about when to use each client.

ClickHouse versions

Both clients support the last 3 releases plus the last 2 LTS releases of the ClickHouse server.

Contact us

If you have any questions or need help, feel free to reach out to us in the Community Slack or via GitHub issues.

Contributing

Contributions are welcome and highly appreciated! Check out our contributing guide.

Official integrations

Acknowledgements

Originally created by Oleg V. Kozlyuk

Contributors

(top 30 of 33)

DarkWanderer

682 commits

alex-clickhouse

280 commits

dependabot[bot]

213 commits

polyglotAI-bot

46 commits

ClickHouse/clickhouse-cs

Official .NET client for ClickHouse DB

C#

94

1,318 commits

updated Sep 25, 2026

See the code

README

ClickHouse C# client


NuGet Version NuGet Downloads

About

Official C# client for ClickHouse. The ClickHouse.Driver NuGet package contains two clients:

  • HTTP client: ClickHouseClient and an ADO.NET provider for ORMs. It sends data in the RowBinary format over HTTP(S). Use it for most applications.
  • Native TCP client (experimental): ClickHouseTcpClient. It uses the ClickHouse native protocol and sends data in columnar blocks.

Documentation

Full documentation is on the ClickHouse website:

Usage examples

We have a wide range of examples, aiming to cover typical scenarios of client usage. They are grouped by client: HTTP and native TCP.

Choosing a client

HTTPNative TCP
StatusStableExperimental. The API can change in a future release.
Main APIClickHouseClient, ADO.NET (ClickHouseConnection)ClickHouseTcpClient
.NET versions6.0 and newer8.0 and newer
Default ports8123 (HTTP), 8443 (HTTPS)9000, 9440 (TLS)
PerformanceFastEven faster: about 2x for typical reads and 1.5x for writes
ADO.NET and ORMs (Dapper, EF Core, linq2db)YesNo
CSV, JSONEachRow, Parquet, and raw streamsYesNo
JSON performanceBetter: binary transferText transfer only
Bearer authentication and custom HTTP headersYesNo
Columnar block readsNoYes
Progress, profile, and server log callbacksNoYes
W3C trace context propagation to ClickHouseNoYes

The overview gives more information about when to use each client.

ClickHouse versions

Both clients support the last 3 releases plus the last 2 LTS releases of the ClickHouse server.

Contact us

If you have any questions or need help, feel free to reach out to us in the Community Slack or via GitHub issues.

Contributing

Contributions are welcome and highly appreciated! Check out our contributing guide.

Official integrations

Acknowledgements

Originally created by Oleg V. Kozlyuk

Contributors

(top 30 of 33)

DarkWanderer

682 commits

alex-clickhouse

280 commits

dependabot[bot]

213 commits

polyglotAI-bot

46 commits

Languages

C#

99.9%