T91.Server.DB
1.0.62
dotnet add package T91.Server.DB --version 1.0.62
NuGet\Install-Package T91.Server.DB -Version 1.0.62
<PackageReference Include="T91.Server.DB" Version="1.0.62" />
<PackageVersion Include="T91.Server.DB" Version="1.0.62" />
<PackageReference Include="T91.Server.DB" />
paket add T91.Server.DB --version 1.0.62
#r "nuget: T91.Server.DB, 1.0.62"
#:package T91.Server.DB@1.0.62
#addin nuget:?package=T91.Server.DB&version=1.0.62
#tool nuget:?package=T91.Server.DB&version=1.0.62
T91.Server.DB
EF Core 10 generic CRUD, multi-tenancy, distributed cache, and DB setup for T91 .NET 10 microservices.
Full documentation: GitHub README
Installation
dotnet add package T91.Server.DB
DbLogic (Generic CRUD)
Extend the appropriate base class to get AddAsync, UpdateAsync, RemoveAsync, FindAsync, SearchAsync, and more:
| Class | ID type |
|---|---|
DbLogic<T, TDb, TCurrent> |
int |
LongDbLogic<T, TDb, TCurrent> |
long |
GuidDbLogic<T, TDb, TCurrent> |
Guid |
UlidDbLogic<T, TDb, TCurrent> |
Ulid |
Override hooks as needed:
public class CurrencyLogic : DbLogic<Currency, AppDbContext, ICurrentScope>
{
public CurrencyLogic(IServiceProvider provider) : base(provider) { }
// Return IsDuplicate = true to block Add/Update
public override async Task<IsDuplicateOutface> IsDuplicateAsync(Currency entity) { ... }
// Return CanRemove = false to block Remove
public override async Task<CanRemoveOutface> CanRemoveAsync(Currency entity) { ... }
}
Multi-Tenancy
T91DbContext applies a global EF Core query filter on TenantId via AsyncLocal — tenant isolation is automatic and pool-safe with AddPooledDbContextFactory.
Distributed Cache
Three tiers with automatic fallback: Redis → PostgreSQL → Null (in-process).
builder.RegisterCache(); // no circuit breaker
builder.RegisterCache(useCircuitBreaker: true); // with SimpleCircuitBreaker
Inject ICacheService into any Logic class. Cache keys are automatically namespaced as {ServiceName}:{TenantId}:{key}.
EF Migrations
Set EF_MIGRATION=true environment variable before running dotnet ef migrations add — this bypasses DI startup so migrations work without a running database.
| 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
- Microsoft.EntityFrameworkCore (>= 10.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0)
- System.Security.Cryptography.Xml (>= 10.0.7)
- T91.Server.App (>= 1.0.62)
- T91.Server.Domain (>= 1.0.62)
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.0.62 | 105 | 5/9/2026 |
| 1.0.58 | 90 | 5/3/2026 |
| 1.0.52 | 98 | 5/2/2026 |
| 1.0.51 | 87 | 5/1/2026 |
| 1.0.50 | 94 | 4/22/2026 |
| 1.0.15 | 170 | 10/26/2024 |
| 1.0.14 | 160 | 10/22/2024 |
| 1.0.13 | 177 | 10/20/2024 |
| 1.0.12 | 164 | 10/20/2024 |
| 1.0.11 | 169 | 10/20/2024 |
| 1.0.10 | 171 | 10/20/2024 |
| 1.0.9 | 175 | 10/19/2024 |
| 1.0.8 | 181 | 10/19/2024 |
| 1.0.7 | 190 | 10/18/2024 |
| 1.0.6 | 149 | 10/14/2024 |
| 1.0.5 | 156 | 10/14/2024 |
| 1.0.4 | 161 | 10/12/2024 |
| 1.0.3 | 162 | 10/11/2024 |
| 1.0.2 | 159 | 10/6/2024 |
| 1.0.1 | 158 | 10/5/2024 |