Pervaxis.Core.MultiTenancy 1.6.0

dotnet add package Pervaxis.Core.MultiTenancy --version 1.6.0
                    
NuGet\Install-Package Pervaxis.Core.MultiTenancy -Version 1.6.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="Pervaxis.Core.MultiTenancy" Version="1.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pervaxis.Core.MultiTenancy" Version="1.6.0" />
                    
Directory.Packages.props
<PackageReference Include="Pervaxis.Core.MultiTenancy" />
                    
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 Pervaxis.Core.MultiTenancy --version 1.6.0
                    
#r "nuget: Pervaxis.Core.MultiTenancy, 1.6.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 Pervaxis.Core.MultiTenancy@1.6.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=Pervaxis.Core.MultiTenancy&version=1.6.0
                    
Install as a Cake Addin
#tool nuget:?package=Pervaxis.Core.MultiTenancy&version=1.6.0
                    
Install as a Cake Tool

Pervaxis.Core.MultiTenancy

Multi-tenancy middleware, tenant context propagation, and tenant-scoped configuration. Implements Section 8 of the Pervaxis Platform Spec.

Installation

dotnet add package Pervaxis.Core.MultiTenancy

Registration

builder.Services.AddPervaxisMultiTenancy();
app.UsePervaxisMultiTenancy();  // resolves TenantId from X-Tenant-ID header

Tenant Context

public class OrderService(ITenantContext tenantContext)
{
    public async Task<IReadOnlyList<Order>> GetOrdersAsync(CancellationToken ct)
    {
        var tenantId = tenantContext.TenantId;
        // All queries are automatically scoped to the current tenant
        return await _repository.GetByTenantAsync(tenantId, ct);
    }
}

Tenant ID Value Object

// TenantId is a readonly record struct — value equality, zero heap allocation
var tenantId = new TenantId("tenant-abc");
Console.WriteLine(tenantId.Value);   // "tenant-abc"
Console.WriteLine(tenantId);         // "tenant-abc" (ToString override)

// Empty/whitespace throws ArgumentException
var invalid = new TenantId("");      // throws

Tenant-Scoped Encryption

Each tenant's sensitive data is encrypted with a tenant-specific AWS KMS key. The key ARN is resolved per-tenant via IKeyManagementService from Pervaxis.Core.Abstractions.


Pervaxis Platform · Clarivex Technologies · https://clarivex.tech

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

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
1.6.0 123 6/6/2026