Huia.EntityFrameworkCore 1.0.0-alpha.4

This is a prerelease version of Huia.EntityFrameworkCore.
dotnet add package Huia.EntityFrameworkCore --version 1.0.0-alpha.4
                    
NuGet\Install-Package Huia.EntityFrameworkCore -Version 1.0.0-alpha.4
                    
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="Huia.EntityFrameworkCore" Version="1.0.0-alpha.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Huia.EntityFrameworkCore" Version="1.0.0-alpha.4" />
                    
Directory.Packages.props
<PackageReference Include="Huia.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 Huia.EntityFrameworkCore --version 1.0.0-alpha.4
                    
#r "nuget: Huia.EntityFrameworkCore, 1.0.0-alpha.4"
                    
#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 Huia.EntityFrameworkCore@1.0.0-alpha.4
                    
#: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=Huia.EntityFrameworkCore&version=1.0.0-alpha.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Huia.EntityFrameworkCore&version=1.0.0-alpha.4&prerelease
                    
Install as a Cake Tool

Huia.EntityFrameworkCore

Entity Framework Core persistence for the Huia identity provider:

  • HuiaDbContext derives from Finbuckle's MultiTenantIdentityDbContext<HuiaUser, HuiaRole, string> and calls builder.UseOpenIddict(). Its constructor takes (IMultiTenantContextAccessor accessor, DbContextOptions<HuiaDbContext> options) and snapshots the resolved TenantInfo at construction — seeding / background code must set the ambient tenant (HuiaTenantScope.Enter(...)) before resolving the context or UserManager.
  • Tenant isolation is a global query filter (TenantId == TenantInfo.Id) on every user / role / claim / login / token entity, plus write-time EnforceMultiTenant() (throws on a tenant-less or cross-tenant write, auto-stamps TenantId on insert). Any deliberately cross-tenant query must .IgnoreQueryFilters() — the filter NREs rather than returning nothing when no tenant is in scope.
  • All tables are renamed to Huia* via ToTable; ApplyTenantScopedIndexes runs last in OnModelCreating and re-adds the named composites the model tests assert (IX_HuiaUsers_Tenant_UserName unique, IX_HuiaUsers_Tenant_Email, IX_HuiaRoles_Tenant_Name unique), superseding Finbuckle's AdjustUniqueIndexes.
  • HuiaSigningKey is not multi-tenant (it carries a manual TenantId), so the key-lifecycle jobs run with no tenant scope. OpenIddict entities are stock; the tenant binding lives in each application's Properties["huia:tenant"] and is enforced by HuiaOpenIddict{Application,Scope}Store (which read IMultiTenantContextAccessor).
  • IMultiTenantContextAccessor extensions CurrentTenantId() / RequireCurrentTenantId() (Huia.EntityFrameworkCore.Multitenancy.TenantAccessorExtensions) for reads.

This package is provider-agnostic and ships no migrations. The host application owns the provider package (for example Npgsql.EntityFrameworkCore.PostgreSQL), the migrations, and the design-time factory.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Huia.EntityFrameworkCore:

Package Downloads
Huia.AspNetCore

Huia ASP.NET Core integration: AddHuia() / UseHuia(), Finbuckle base-path multi-tenancy, the OpenIddict server and client, the Razor Pages account UI, passwordless SMS, the signing-key lifecycle jobs and opt-in security headers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.4 52 9/6/2026
1.0.0-alpha.3 70 8/17/2026
1.0.0-alpha.2 64 8/13/2026
1.0.0-alpha.1 63 8/11/2026