T91.Server.API
1.0.52
See the version list below for details.
dotnet add package T91.Server.API --version 1.0.52
NuGet\Install-Package T91.Server.API -Version 1.0.52
<PackageReference Include="T91.Server.API" Version="1.0.52" />
<PackageVersion Include="T91.Server.API" Version="1.0.52" />
<PackageReference Include="T91.Server.API" />
paket add T91.Server.API --version 1.0.52
#r "nuget: T91.Server.API, 1.0.52"
#:package T91.Server.API@1.0.52
#addin nuget:?package=T91.Server.API&version=1.0.52
#tool nuget:?package=T91.Server.API&version=1.0.52
T91.Server.API
Base controller, global error middleware, and response filters for T91 .NET 10 microservices.
Full documentation: GitHub README
Installation
dotnet add package T91.Server.API
Key Components
T91Controller
Base controller all service controllers should extend. Applies [DateTimeConversion] automatically — all DateTime response properties are converted from UTC to the caller's local timezone via the X-Timezone request header.
[Route("/[controller]")]
public class CurrencyController : T91Controller { ... }
Opt out with [SkipDateTimeConversion] on a controller or action. Exclude individual properties with [UtcOnly].
ErrorHandlingMiddleware
Global exception handler — maps exceptions to HTTP status codes:
| Exception | Status |
|---|---|
LogicException |
ex.Code (default 400) |
NotFoundException |
404 |
| Everything else | 500 |
app.UseMiddleware<ErrorHandlingMiddleware>();
Override HttpStatusCodeByException to add custom mappings.
DateTimeConversionFilter
Applied automatically via T91Controller. Reads ICurrentScope.Timezone (IANA ID from X-Timezone header) and converts all non-[UtcOnly] DateTime properties in the response. No conversion when header is absent or "UTC".
| 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
- T91.Server.Domain (>= 1.0.52)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.