HexDB.EntityFrameworkCore 2.3.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package HexDB.EntityFrameworkCore --version 2.3.3
                    
NuGet\Install-Package HexDB.EntityFrameworkCore -Version 2.3.3
                    
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="HexDB.EntityFrameworkCore" Version="2.3.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HexDB.EntityFrameworkCore" Version="2.3.3" />
                    
Directory.Packages.props
<PackageReference Include="HexDB.EntityFrameworkCore" />
                    
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 HexDB.EntityFrameworkCore --version 2.3.3
                    
#r "nuget: HexDB.EntityFrameworkCore, 2.3.3"
                    
#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 HexDB.EntityFrameworkCore@2.3.3
                    
#: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=HexDB.EntityFrameworkCore&version=2.3.3
                    
Install as a Cake Addin
#tool nuget:?package=HexDB.EntityFrameworkCore&version=2.3.3
                    
Install as a Cake Tool

HexDB.EntityFrameworkCore

An Entity Framework Core 9 provider for HexDB, built on HexDB.Client. Each entity type maps to a tessellation, LINQ filters, sorting and paging run on the server, and each SaveChanges is sent as one atomic transaction, with concurrency tokens becoming preconditions. Relationships (with Include), owned types (nested in the document), inheritance (one tessellation per hierarchy) and explicit transactions work too.

dotnet add package HexDB.EntityFrameworkCore
protected override void OnConfiguring(DbContextOptionsBuilder options) =>
    options.UseHexDB("http://127.0.0.1:7700", Environment.GetEnvironmentVariable("HEXDB_API_KEY"));

db.Orders.Add(new Order { Customer = "ada", Total = 12 });   // string Id left null: a ULID is generated
await db.SaveChangesAsync();
var big = await db.Orders.Where(o => o.Total > 10).OrderByDescending(o => o.Total).ToListAsync();

UseHexDB also takes a HexDB connection URI, the same string every HexDB driver accepts:

options.UseHexDB("hexdbs://db.example.com?apiKey=hxk_...&pageSize=200");
options.UseHexDB("hexdbs://db.example.com", apiKey, o => o.HttpClient(myClient));

The provider uses the URI's login (signing in on the first request), apiKey, timeout and pageSize. pageSize is capped at the provider's limit of 1000 documents per request, and o.PageSize(n) overrides it. An apiKey argument is used instead of the URI's.

A query HexDB can't answer throws instead of quietly loading everything into memory. Many-to-many skip navigations, filtered includes, complex types and composite keys aren't supported yet. The manual covers the mapping, relationships, owned types, inheritance, the supported LINQ, transactions and concurrency tokens.

Requires .NET 8 or later and EF Core 9. Licensed under the Apache License 2.0.

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
2.5.9 48 11/19/2026
2.5.8 42 11/18/2026
2.5.7 74 11/16/2026
2.5.6 89 11/16/2026
2.5.5 93 11/14/2026
2.5.4 86 11/13/2026
2.5.3 87 11/13/2026
2.5.2 86 11/13/2026
2.5.1 92 11/13/2026
2.5.0 90 11/12/2026
2.4.7 93 11/11/2026
2.4.6 89 11/10/2026
2.4.5 94 11/10/2026
2.4.4 84 11/10/2026
2.4.3 95 11/9/2026
2.4.2 90 11/7/2026
2.4.1 95 11/5/2026
2.4.0 97 11/5/2026
2.3.3 88 11/4/2026
2.3.2 91 11/3/2026
Loading failed