ResultKit

Clean Result<T> handling, built-in validation, and ASP.NET Core ProblemDetails integration for .NET.

v2.1.0
2.2k installs
.NET 8, 9, 10
MIT licensed
Two packages

Core library + ASP.NET Core integration

Routya.ResultKit

v2.1.0
2.2k installs

Lightweight result wrapper, validation, and transformation toolkit for clean Result<T> handling across your .NET codebase.

ValidationResultsTransforms
Consistent Result<T> pattern
One-line validation with .Validate()
Transform() for safe projections
Rich validation attributes
Nested object validation
dotnet add package Routya.ResultKit

Routya.ResultKit.AspNetCore

v2.1.0
1.1k installs

ASP.NET Core integration layer — automatic exception handling, RFC 7807 ProblemDetails, and seamless ToHttpResult() extensions for Minimal APIs and MVC.

ASP.NET CoreProblemDetailsMiddleware
Automatic exception handling
RFC 7807 ProblemDetails
Minimal API & MVC support
Custom exception mappers
ToHttpResult() extensions
dotnet add package Routya.ResultKit.AspNetCore
Example

How it reads in practice

A single Result<T> flows from validation through transformation to HTTP response.

// 1. Validate an incoming request in one line
var result = request.Validate();

// 2. Transform the validated payload into a domain type
var product = result.Transform(r =>
    new Product(r.Name, r.Price, r.Sku));

// 3. Return it directly from a Minimal API endpoint
//    — ASP.NET Core integration converts to ProblemDetails on failure
return product.ToHttpResult();

No if-else ladders, no exception-based control flow. Validation failures become RFC 7807 ProblemDetails responses automatically when you use the AspNetCore package.