ClickHouse.EntityFrameworkCore
0.1.0-preview
dotnet add package ClickHouse.EntityFrameworkCore --version 0.1.0-preview
NuGet\Install-Package ClickHouse.EntityFrameworkCore -Version 0.1.0-preview
<PackageReference Include="ClickHouse.EntityFrameworkCore" Version="0.1.0-preview" />
<PackageVersion Include="ClickHouse.EntityFrameworkCore" Version="0.1.0-preview" />
<PackageReference Include="ClickHouse.EntityFrameworkCore" />
paket add ClickHouse.EntityFrameworkCore --version 0.1.0-preview
#r "nuget: ClickHouse.EntityFrameworkCore, 0.1.0-preview"
#:package ClickHouse.EntityFrameworkCore@0.1.0-preview
#addin nuget:?package=ClickHouse.EntityFrameworkCore&version=0.1.0-preview&prerelease
#tool nuget:?package=ClickHouse.EntityFrameworkCore&version=0.1.0-preview&prerelease
ClickHouse Entity Framework Core Provider
An Entity Framework Core provider for ClickHouse, built on ClickHouse.Driver.
Getting Started
await using var ctx = new AnalyticsContext();
var topPages = await ctx.PageViews
.Where(v => v.Date >= new DateOnly(2024, 1, 1))
.GroupBy(v => v.Path)
.Select(g => new { Path = g.Key, Views = g.Count() })
.OrderByDescending(x => x.Views)
.Take(10)
.ToListAsync();
public class AnalyticsContext : DbContext
{
public DbSet<PageView> PageViews { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseClickHouse("Host=localhost;Port=9000;Database=analytics");
}
public class PageView
{
public long Id { get; set; }
public string Path { get; set; }
public DateOnly Date { get; set; }
public string UserAgent { get; set; }
}
Supported Types
String, Bool, Int8/Int16/Int32/Int64, UInt8/UInt16/UInt32/UInt64, Float32/Float64, Decimal(P, S), Date/Date32, DateTime, DateTime64(P, 'TZ'), FixedString(N), UUID
Supported LINQ Operations
Where, OrderBy, Take, Skip, Select, First, Single, Any, Count, Sum, Min, Max, Average, Distinct, GroupBy
String methods: Contains, StartsWith, EndsWith, IndexOf, Replace, Substring, Trim, ToLower, ToUpper, Length, and string concatenation.
Documentation
For full documentation, see the GitHub repository.
| Product | Versions 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. |
-
net10.0
- ClickHouse.Driver (>= 1.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.2)
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 |
|---|---|---|
| 0.1.0-preview | 39 | 3/9/2026 |
v0.1.0
---
Initial preview release.
* Read-only functionality.
* Limited type support: `String`, `Bool`, `Int8`/`Int16`/`Int32`/`Int64`, `UInt8`/`UInt16`/`UInt32`/`UInt64`, `Float32`/`Float64`, `Decimal(P, S)`, `Date`/`Date32`, `DateTime`, `DateTime64(P, 'TZ')`, `FixedString(N)`, `UUID`.
* Basic aggregations: `Where`, `OrderBy`, `Take`, `Skip`, `Select`, `First`, `Single`, `Any`, `Count`, `Sum`, `Min`, `Max`, `Average`, `Distinct`, `GroupBy`.
* String methods: `Contains`, `StartsWith`, `EndsWith`, `IndexOf`, `Replace`, `Substring`, `Trim`, `ToLower`, `ToUpper`, `Length`.