EFCore.Kusto 0.1.0

dotnet add package EFCore.Kusto --version 0.1.0
                    
NuGet\Install-Package EFCore.Kusto -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EFCore.Kusto" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EFCore.Kusto" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="EFCore.Kusto" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EFCore.Kusto --version 0.1.0
                    
#r "nuget: EFCore.Kusto, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EFCore.Kusto@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EFCore.Kusto&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=EFCore.Kusto&version=0.1.0
                    
Install as a Cake Tool

EFCore.Kusto

NuGet Version

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.


Table of Contents


1. Installation

Install the package from NuGet:

dotnet add package EFCore.Kusto

Or via csproj:

<ProjectReference Include="src/EFCore.Kusto/EFCore.Kusto.csproj" />

2. Getting Started

  1. 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());
    });
    
    • Use UseManagedIdentity(clientId) for a user-assigned identity, or omit the client id for system-assigned identities.
    • Use UseApplicationAuthentication(tenantId, clientId, clientSecret) for app registrations.
    • Use UseTokenCredential(credential) to supply any TokenCredential (e.g., one registered via AddKustoManagedIdentityCredential or AddKustoApplicationRegistration).
    • If no authentication option is configured, the provider falls back to DefaultAzureCredential when executing queries.
  2. 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.


3. Project Goals

  • Provide a reliable LINQ-to-KQL translation layer.
  • Integrate cleanly with ASP.NET Core OData (v8+).
  • Offer predictable, debuggable SQL generation.
  • Ensure correctness and performance for high‑volume analytical datasets.
  • Remain lightweight with minimal runtime overhead.

4. Current Capabilities

Query Translation

This provider currently supports:

  • Where filters
  • Select projections
  • Ordering (OrderBy, ThenBy)
  • Pagination (Skip, Take)
  • Basic join translation used by OData $expand
  • Counts as used by OData $count

OData Compatibility

EFCore.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.


5. Contributing

Contributions are welcome.
If you encounter a translation issue, please include:

  1. The LINQ expression (or OData URL if applicable).
  2. The expected KQL.
  3. The generated KQL (if available).

This helps isolate translation gaps quickly.


6. License

MIT License – simple, permissive, widely accepted.

EFCore.Kusto is free for commercial and open‑source use.


7. Disclaimer

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 Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 170 11/23/2025