Koras.Results
0.1.0-preview.1
dotnet add package Koras.Results --version 0.1.0-preview.1
NuGet\Install-Package Koras.Results -Version 0.1.0-preview.1
<PackageReference Include="Koras.Results" Version="0.1.0-preview.1" />
<PackageVersion Include="Koras.Results" Version="0.1.0-preview.1" />
<PackageReference Include="Koras.Results" />
paket add Koras.Results --version 0.1.0-preview.1
#r "nuget: Koras.Results, 0.1.0-preview.1"
#:package Koras.Results@0.1.0-preview.1
#addin nuget:?package=Koras.Results&version=0.1.0-preview.1&prerelease
#tool nuget:?package=Koras.Results&version=0.1.0-preview.1&prerelease
Koras.Results
A lightweight, strongly typed Result pattern and standardized error-handling library for .NET — the zero-dependency core of the Koras.Results family.
using Koras.Results;
public Result<Order> Place(PlaceOrder cmd) =>
_catalog.Find(cmd.Sku) // Result<Product>
.Ensure(p => p.Stock >= cmd.Qty,
p => Error.Conflict("Order.InsufficientStock", $"Not enough '{p.Sku}'."))
.Map(p => Order.Create(p, cmd.Qty));
var message = result.Match(
order => $"Placed {order.Id}",
error => $"Rejected: {error.Code}");
Features
Result/Result<T>as allocation-freereadonly structs — success allocates nothing- Semantic error taxonomy (
Validation,NotFound,Conflict,Unauthorized,Forbidden,Unavailable,Failure,Unexpected) with stable error codes and metadata ValidationErrorwith field-level errors- Functional composition:
Map,Bind,Match,Ensure,Tap,MapError— sync and async Result.Try/Result.TryAsyncexception boundaries (cancellation always propagates)Result.Combinefailure aggregation- System.Text.Json serialization out of the box
- Full nullable-reference-type annotations
Companion packages
| Package | Purpose |
|---|---|
Koras.Results.AspNetCore |
RFC 9457 ProblemDetails, Minimal API + MVC integration |
Koras.Results.FluentValidation |
FluentValidation → Result conversion |
Koras.Results.MediatR |
Validation pipeline behavior for MediatR 12.x |
Koras.Results.OpenTelemetry |
Activity error tagging |
Documentation: https://github.com/korastechnologies/koras-results/tree/main/docs
| 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
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Koras.Results:
| Package | Downloads |
|---|---|
|
Koras.Results.AspNetCore
ASP.NET Core integration for Koras.Results: converts Result failures into RFC 9457 ProblemDetails responses with configurable status-code mapping, Minimal API IResult adapters, MVC IActionResult adapters, validation-error dictionaries, localization hooks, and secure-by-default error detail handling. |
|
|
Koras.Results.FluentValidation
FluentValidation integration for Koras.Results: converts ValidationResult and ValidationFailure into typed ValidationError values, and provides ValidateToResult / ValidateToResultAsync for validating directly into Result<T>. |
|
|
Koras.Results.MediatR
MediatR integration for Koras.Results: a validation pipeline behavior that runs FluentValidation validators and short-circuits with a failed Result instead of throwing ValidationException. Depends on MediatR 12.x (Apache-2.0 licensed versions). |
|
|
Koras.Results.OpenTelemetry
OpenTelemetry-friendly observability for Koras.Results: tags the current System.Diagnostics.Activity with error.type and koras.error.code on failures, following OpenTelemetry semantic conventions. Depends only on System.Diagnostics.DiagnosticSource — composes with any OpenTelemetry SDK setup. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 102 | 7/16/2026 |