Csag.Blueprint.Infrastructure
0.1.1
dotnet add package Csag.Blueprint.Infrastructure --version 0.1.1
NuGet\Install-Package Csag.Blueprint.Infrastructure -Version 0.1.1
<PackageReference Include="Csag.Blueprint.Infrastructure" Version="0.1.1" />
<PackageVersion Include="Csag.Blueprint.Infrastructure" Version="0.1.1" />
<PackageReference Include="Csag.Blueprint.Infrastructure" />
paket add Csag.Blueprint.Infrastructure --version 0.1.1
#r "nuget: Csag.Blueprint.Infrastructure, 0.1.1"
#:package Csag.Blueprint.Infrastructure@0.1.1
#addin nuget:?package=Csag.Blueprint.Infrastructure&version=0.1.1
#tool nuget:?package=Csag.Blueprint.Infrastructure&version=0.1.1
Csag.Blueprint.Infrastructure
Overview
This package provides the shared infrastructure implementation layer for CSAG Blueprint-based applications.
It contains the reusable EF Core persistence backbone, session/auth infrastructure, localization infrastructure, tenancy helpers, authorization transformation, and table-view execution components that consuming applications compose into their own host.
What this package owns
Persistence backbone
| Component | Purpose |
|---|---|
BlueprintDbContext<TAppTenant, TAppUser, TAppRole> |
Shared EF Core base context that owns the blueprint persistence model. |
Blueprint*Configuration classes |
EF Core mappings for blueprint-owned entities and inheritance roots. |
MultiTenancyModelBuilderExtensions |
Applies tenant filters/indexing/model conventions for tenant-scoped entities. See Data isolation topology for the database-per-tenant option. |
Data isolation topology
ConfigureBlueprintMultiTenancy implements the pooled topology: every entity implementing
IMustHaveTenant gets a global query filter on TenantId, an index on that column, and a foreign key
to the tenant table.
modelBuilder.ConfigureBlueprintMultiTenancy<ApplicationTenant, ApplicationDbContext>(this);
Because isolation is enforced by the filter and not the database, any table that cannot carry a tenant discriminator — the user table, since identity is shared — is a permanent sharp edge that must be scoped by membership on every query.
Moving to database-per-tenant. Pass addTenantForeignKey: false when tenant-owned data lives in a
different database from the tenant table; a foreign key cannot cross databases, so emitting one there
produces an invalid model. The filter and index still apply — only referential integrity moves from
the database to the application.
modelBuilder.ConfigureBlueprintMultiTenancy<ApplicationTenant, BusinessDbContext>(
this, addTenantForeignKey: false);
Note that IMustHaveTenant is not a synonym for "shardable". Some tenant-owned entities are
identity concerns — a service account is tenant-scoped but authentication needs it, so it must stay in
the central database. Classify each entity by plane before splitting anything.
Interceptors
| Interceptor | Purpose |
|---|---|
AuditableTimestampInterceptor |
Sets CreatedAt/UpdatedAt automatically for IAuditable entities. |
TenantSaveInterceptor |
Assigns and protects TenantId for IMustHaveTenant entities. |
Session and authorization infrastructure
| Component | Purpose |
|---|---|
DistributedCacheTicketStore |
ASP.NET Core ITicketStore implementation for server-side session storage. |
TicketCacheService |
Serialization/cache wrapper for authentication tickets. |
PostConfigureCookieAuthenticationOptions |
Injects the ticket store into cookie authentication options. |
SessionManager |
Shared session revocation/refresh management. |
PermissionClaimsTransformation |
Expands role claims into permission claims after authentication. |
UserManagerAuthorizationExtensions |
Loads roles and permissions for users. |
Tenancy and localization infrastructure
| Component | Purpose |
|---|---|
TenantService / TenantManager |
Reusable tenant access and membership logic. |
BlueprintDbStringLocalizer / BlueprintDbStringLocalizerFactory |
Database-backed localization infrastructure. |
PassThroughStringLocalizer |
Generation-mode localizer that returns keys as-is. |
TranslationCacheKeys |
Cache key helpers for localization caching. |
MigrationBuilderExtensions |
Translation seeding helpers for migrations. |
Table view infrastructure
| Component | Purpose |
|---|---|
TableViewExecutor |
Executes filtering, sorting, counting, pagination, and projection for table-view queries. |
TableViewCatalogService |
Discovers and filters registered table views by permission. |
BlueprintTableViewPreferencesService |
Persists per-user table view preferences. |
Ownership Boundary
This package owns reusable infrastructure, not application composition.
The consuming application still owns:
- the concrete
ApplicationDbContext - DI composition and host setup
- app-specific options and policies
- app-specific entities and migrations
| Product | Versions 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. |
-
net10.0
- Csag.Blueprint.Application (>= 0.1.1)
- Csag.Blueprint.Domain (>= 0.1.1)
- Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (>= 10.0.10)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.10)
- Microsoft.Data.SqlClient (>= 7.0.2)
- Microsoft.EntityFrameworkCore (>= 10.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.10)
- Neolution.Extensions.Caching.Distributed (>= 3.0.0-beta.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Csag.Blueprint.Infrastructure:
| Package | Downloads |
|---|---|
|
Csag.Blueprint.Web
ASP.NET Core middleware, validated options, security configuration, and FastEndpoints extensions for CSAG Blueprint applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.