Skip to content

ORM support

Oleg V. Kozlyuk edited this page Sep 1, 2022 · 15 revisions

Dapper

ClickHouse.Client provides support for Dapper, with an exception for specialized types (Arrays, IPv4, IPv6, Nullable, Tuple, Nested etc) and Date, which are not supported in Dapper itself

Parameters need to be passed as Dictionary<string, object>. Following will work:

connection.QueryAsync<string>("select {p1:Int32}", new Dictionary<string, object> { { "p1", 42 } });

Following will not:

connection.QueryAsync<string>("select {p1:Int32}", new { p1 = 42 });

EntityFramework.Core

ClickHouse.Client does not have direct support for EntityFramework.Core, but there are external libraries which provide this functionality

Linq2DB

Linq2DB offers native support for ClickHouse.Client