ZWebAPI 1.17.0
dotnet add package ZWebAPI --version 1.17.0
NuGet\Install-Package ZWebAPI -Version 1.17.0
<PackageReference Include="ZWebAPI" Version="1.17.0" />
<PackageVersion Include="ZWebAPI" Version="1.17.0" />
<PackageReference Include="ZWebAPI" />
paket add ZWebAPI --version 1.17.0
#r "nuget: ZWebAPI, 1.17.0"
#:package ZWebAPI@1.17.0
#addin nuget:?package=ZWebAPI&version=1.17.0
#tool nuget:?package=ZWebAPI&version=1.17.0
ZWebAPI
ZWebAPI is a library that brings additional functionalities for web API projects.
Supported frameworks
ZWebAPI ships assets for .NET 8, .NET 9 and .NET 10.
| Target framework | Notes |
|---|---|
net10.0 |
LTS, supported until November 2028 |
net9.0 |
STS, out of support since May 2026 |
net8.0 |
LTS, out of support after November 2026 |
ZWebAPI depends on ZDatabase and ZSecurity, which ship the same three targets. ZDatabase carries the EF Core dependency for each of them.
The net9.0 and net8.0 targets exist for compatibility with applications that have not yet
moved to .NET 10. Both of those runtimes are at or near end of support, so new projects should
target net10.0.
Global exception handling
AddGlobalExceptionHandling turns any exception that leaves a controller into an RFC 7807 response,
so actions no longer need a try/catch each. It needs ASP.NET Core, which ZWebAPI references
through the Microsoft.AspNetCore.App shared framework.
builder.Services.AddGlobalExceptionHandling(options =>
{
// Application-specific mappings. They run after the defaults, so they can override them.
options.Map<ValidationFailureException>((exception, _) =>
ExceptionResponse.Content(StatusCodes.Status400BadRequest, exception.Message));
});
WebApplication app = builder.Build();
app.UseGlobalExceptionHandling(); // first in the pipeline
Default mappings:
| Exception | Response |
|---|---|
EntityNotFoundException<T> |
404 problem |
EntityValidationFailureException<TKey> |
400 validation problem, with the entity key in entityKey |
MissingUserPermissionException |
403 problem |
| anything else | 500 problem |
A mapping matches the exact type first, then an open generic, then each base type.
Every problem carries traceId. When the response is a fault (500 and above, or a mapping that
calls Capture()), the exception goes to the IExceptionReporter registered by the application,
and the identifier it returns is written as errorId. Register the reporter as scoped. Without one,
nothing is reported.
The exception detail (message, inner message, stack trace, type) is written only when the host runs
in Development and IsExceptionDetailIncludedInDevelopment is true. It is off by default.
ActionArgumentsBreadcrumbFilter is registered with the handler. When an action throws, it adds the
action's arguments as a breadcrumb, so the reported error still says what the action received.
Health checks
builder.Services.AddDefaultHealthChecks();
// ...
app.MapDefaultHealthChecks(); // "/health" and "/health/ready"
/healthis the liveness probe. It runs no check, so a database outage does not restart the process./health/readyis the readiness probe. It runs the checks taggedready, which by default is the database check:CanConnectAsyncon the registeredIDbContext.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- AutoMapper (>= 14.0.0)
- ClosedXML (>= 0.104.2)
- QuestPDF (>= 2024.12.3)
- ZDatabase (>= 1.6.0)
- ZSecurity (>= 1.4.0)
-
net8.0
- AutoMapper (>= 14.0.0)
- ClosedXML (>= 0.104.2)
- QuestPDF (>= 2024.12.3)
- ZDatabase (>= 1.6.0)
- ZSecurity (>= 1.4.0)
-
net9.0
- AutoMapper (>= 14.0.0)
- ClosedXML (>= 0.104.2)
- QuestPDF (>= 2024.12.3)
- ZDatabase (>= 1.6.0)
- ZSecurity (>= 1.4.0)
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.17.0 | 44 | 10/31/2026 |
| 1.16.0 | 98 | 10/26/2026 |
| 1.15.0 | 135 | 9/26/2026 |
| 1.14.0 | 134 | 9/19/2026 |
| 1.13.3 | 104 | 9/16/2026 |
| 1.13.2 | 238 | 6/12/2026 |
| 1.13.1 | 127 | 6/11/2026 |
| 1.13.0 | 206 | 6/2/2026 |
| 1.12.0 | 253 | 1/21/2026 |
| 1.11.2 | 497 | 3/20/2025 |
| 1.11.1 | 191 | 12/26/2024 |
| 1.10.0 | 213 | 11/24/2024 |
| 1.9.1 | 223 | 6/25/2024 |
| 1.9.0 | 206 | 6/12/2024 |
| 1.8.1 | 204 | 5/30/2024 |
| 1.8.0 | 204 | 5/14/2024 |
| 1.7.0 | 172 | 5/13/2024 |
| 1.6.0 | 221 | 4/23/2024 |
| 1.5.1 | 232 | 3/8/2024 |
| 1.5.0 | 203 | 3/8/2024 |