![]() |
VOOZH | about |
dotnet add package EFCore.Kusto --version 0.2.5
NuGet\Install-Package EFCore.Kusto -Version 0.2.5
<PackageReference Include="EFCore.Kusto" Version="0.2.5" />
<PackageVersion Include="EFCore.Kusto" Version="0.2.5" />Directory.Packages.props
<PackageReference Include="EFCore.Kusto" />Project file
paket add EFCore.Kusto --version 0.2.5
#r "nuget: EFCore.Kusto, 0.2.5"
#:package EFCore.Kusto@0.2.5
#addin nuget:?package=EFCore.Kusto&version=0.2.5Install as a Cake Addin
#tool nuget:?package=EFCore.Kusto&version=0.2.5Install as a Cake Tool
A lightweight, extensible Entity Framework Core provider for translating LINQ queries into Kusto Query Language (KQL) AKA Azure Data Explorer (ADX).
While I primarily built this to integrate with ASP.NET Core OData (v8+) for analytical workloads, it can be used standalone for any LINQ-to-KQL translation needs.
Install the package from NuGet:
dotnet add package EFCore.Kusto
Or via csproj:
<ProjectReference Include="src/EFCore.Kusto/EFCore.Kusto.csproj" />
Register your DbContext with the Kusto provider and pick an authentication option:
builder.Services.AddDbContext<PropertyContext>((sp, options) =>
{
options.UseKusto(
clusterUrl: "https://<cluster>.kusto.windows.net",
database: "<database>",
kusto => kusto.UseManagedIdentity());
});
UseManagedIdentity(clientId) for a user-assigned identity, or omit the client id for system-assigned
identities.UseApplicationAuthentication(tenantId, clientId, clientSecret) for app registrations.UseTokenCredential(credential) to supply any TokenCredential (e.g., one registered
via AddKustoManagedIdentityCredential or AddKustoApplicationRegistration).DefaultAzureCredential when executing
queries.Optional: register shared credentials so they can be reused when building DbContext options:
builder.Services.AddKustoManagedIdentityCredential(clientId: "<client-id>");
// or
builder.Services.AddKustoApplicationRegistration(
tenantId: "<tenant-id>",
clientId: "<client-id>",
clientSecret: "<client-secret>");
These helpers register a singleton TokenCredential you can inject when calling UseTokenCredential
inside AddDbContext.
This provider currently supports:
Where filtersSelect projectionsOrderBy, ThenBy)Skip, Take)GroupBy with aggregates (Sum, Min, Max, Average, Count, LongCount,
Count(predicate) → countif, Distinct().Count() → dcount)?:) → iif / case$expand$countEFCore.Kusto works well with:
$filter$select$orderby$count$skip, $top$expand (entity relationships)If specific OData query shapes cause issues, they can be addressed case‑by‑case. Community reports are welcome.
EFCore.Kusto supports data modification using Kusto-native control commands.
Add, AddRange) via .ingestUpdate) via .update tableRemove, RemoveRange) via .delete tableNote: Transactional guarantees and concurrency semantics are constrained by Kusto’s execution model.
EF Core migrations are supported, translating schema operations into KQL control commands
(.create-merge table, .alter-merge table, .drop, .rename, etc.). Standard tooling works:
dotnet ef migrations add, dotnet ef database update, dotnet ef migrations script. Applied
migrations are tracked in an EFMigrationsHistory table.
Migrations run against the database selected by UseKusto(cluster, database) — Kusto's database
is the schema equivalent and is fixed at the connection, so EF schema operations are no-ops.
This feature is experimental. Limitations:
.alter column type= clears existing data in that column (Kusto semantics).See for a detailed version history.
Contributions are welcome.
If you encounter a translation issue, please include:
This helps isolate translation gaps quickly.
MIT License – simple, permissive, widely accepted.
EFCore.Kusto is free for commercial and open‑source use.
While this provider is functional and under active development, it is not yet battle-tested in production environments.
If you encounter unexpected behavior, open an issue — the goal is full reliability for production workloads.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.5 | 43 | 6/17/2026 |
| 0.2.4 | 125 | 6/1/2026 |
| 0.2.3 | 122 | 5/25/2026 |
| 0.2.2 | 109 | 5/8/2026 |
| 0.2.1 | 288 | 3/11/2026 |
| 0.2.0 | 159 | 1/30/2026 |
| 0.1.9 | 123 | 1/28/2026 |
| 0.1.8 | 131 | 1/23/2026 |
| 0.1.7 | 134 | 1/18/2026 |
| 0.1.6 | 138 | 1/9/2026 |
| 0.1.5 | 223 | 12/23/2025 |
| 0.1.4 | 220 | 12/22/2025 |
| 0.1.3 | 266 | 12/19/2025 |
| 0.1.2 | 305 | 12/18/2025 |
| 0.1.1.1 | 260 | 12/19/2025 |
| 0.1.0 | 235 | 11/23/2025 |
Version 0.2.5:
- Multi-targeted net8.0, net9.0 and net10.0, building against EF Core 8, 9 and 10 respectively. Adapted to the EF Core 9 migrations API (HistoryRepository database lock, IMigrationCommandExecutor overloads) and the EF Core 10 RelationalCommand logCommandText. Query parameter naming now works across versions (EF Core 10 dropped the "__" prefix).
Version 0.2.4:
- Added experimental EF Core migrations support (schema ops -> KQL control commands, EFMigrationsHistory tracking). Non-transactional; alter-column-type clears data; relational-only constructs are no-ops.
Version 0.2.3:
- Added GroupBy -> KQL summarize translation (Sum/Min/Max/Avg/Count/LongCount, countif, dcount).
- Added conditional (?:) translation to iif / case.
- Fixed parameter substitution to emit typed KQL literals (was using raw ToString).
Version 0.2.2:
- Fixed duplicate parameter issue.
Version 0.2.1:
- Convert from Hex string for byte arrays.
Version 0.2.0:
- Added support for `Any()` translation.
Version 0.1.9:
- Added support for OUTER APPLY and CROSS APPLY.
Version 0.1.8:
- Fixed inequality comparisons on strings.
Version 0.1.7:
- Fixed `not` operator translation
- Fixed duplicate column issue in joins
- Implemented `Contains`
Version 0.1.6:
- Fixed NULL handling in PATCH requests.
- Better string escaping in PATCH requests.
Version 0.1.5:
- Optimized `.update` command to use less nesting and support larger batches.
Version 0.1.4:
- Fixed `COUNT(*)` regression resulting from `KustoQuerySqlGenerator.WriteProjection` refactor.
Version 0.1.3:
- Added support for `DateOnly` type translation.
Version 0.1.2:
- Added write command batching per entity/table.
Version 0.1.1:
- Added update support via Kusto `.update table` commands.
Version 0.1.0:
- Initial release (read-only query support).