Note This repository multi-targets
netstandard2.1,net6.0,net7.0,net8.0andnet9.0.
The important thing about this repository is to offer the possibility to manage and organize your result/response from infrastructure to user/controller, as the principal repository around which are built all extensions is AggregatedGenericResultMessage.
In case you wish to use it in your project, u can install the package from nuget.org or specify what version you want:
Install-Package AggregatedGenericResultMessage.Web -Version x.x.x.x
- Multi-target:
netstandard2.1/net6.0/net7.0/net8.0/net9.0from a single package. - Pluggable
IResultStatusCodeMapper— centralize status-code resolution, swap globally viaAddWebResultMessageMapper(...). - Pluggable
IProblemDetailsResultFactory— control ProblemDetailstype/title/detail/instance/ extensions in one place, swap viaAddProblemDetailsResultFactory(...). - MVC exception filter (
AddWebResultExceptionFilter()) + generalized middleware (UseResultExceptionMiddleware()) — auto-translate unhandled exceptions (includingWebResultException) to ProblemDetails, no per-actiontry/catch. - Minimal-API adapters (net6.0+):
IResult.ToHttpResult(...)andResultMessageHttpResults.From(...)— identical wire format as MVC. - Automatic correlation:
traceIdemitted fromHttpContext.TraceIdentifierunless explicitly overridden by the caller.