IResultPattern 1.5.1
dotnet add package IResultPattern --version 1.5.1
NuGet\Install-Package IResultPattern -Version 1.5.1
<PackageReference Include="IResultPattern" Version="1.5.1" />
<PackageVersion Include="IResultPattern" Version="1.5.1" />
<PackageReference Include="IResultPattern" />
paket add IResultPattern --version 1.5.1
#r "nuget: IResultPattern, 1.5.1"
#:package IResultPattern@1.5.1
#addin nuget:?package=IResultPattern&version=1.5.1
#tool nuget:?package=IResultPattern&version=1.5.1
iResultPattern
A lightweight and expressive result‑handling package designed for .NET applications. <br> 🚀 IResult Pattern – A Clean, Explicit and Production-Ready Result Model for .NET
Stop returning raw exceptions. Stop mixing business logic with HTTP responses. Start modeling results explicitly.
🎯 What Is This Package?
IResult Pattern is a lightweight, production-ready result modeling library for .NET applications that provides a clean and consistent way to represent operation outcomes.
Instead of throwing exceptions for flow control or returning loosely structured responses, this package helps you return strongly-typed, explicit, and predictable results across your application layers.
Perfect for:
- ASP.NET Core Web APIs
- Clean Architecture
- Domain-Driven Design (DDD)
- Microservices
- Event-Driven systems
- Modular monoliths
✨ Key Features
🔹 Explicit Status Modeling
Includes structured result statuses aligned with HTTP semantics:
- Success (200)
- Created (201)
- NoContent (204)
- BadRequest (400)
- Unauthorized (401)
- Forbidden (403)
- NotFound (404)
- Conflict (409)
- ValidationError (422)
- InternalServerError (500)
- ServiceUnavailable (503)
This enables clear and predictable API behavior.
🔹 Strongly-Typed Results
Result<T>
Result
Return data safely with proper status and messages.
🔹 Backward Compatible
Legacy Failure status is still supported (marked as obsolete), ensuring no breaking changes for existing systems.
🔹 Clean Architecture Friendly
Designed to:
- Separate business logic from transport layer concerns
- Improve readability
- Reduce exception misuse
- Provide consistent response contracts
🔹 Lightweight & Dependency-Free
- No external dependencies.
- No magic.
- Just clean, explicit result modeling.
🧠 Why Use This Instead of Exceptions?
Exceptions should represent exceptional conditions — not validation failures or predictable outcomes.
This package encourages:
- Explicit business outcomes
- Better error handling
- Improved API consistency
- Easier testing
- Clearer code semantics
🔥 Example
return Result.Success(data);
return Result.NotFound("User not found");
return Result.ValidationError(errors);
Clean. Predictable. Maintainable.
🎯 Who Is This For?
This package is ideal for developers who:
Care about clean code
- Use DDD or Clean Architecture
- Want explicit and expressive application flow
- Build scalable APIs and services
If you believe that clarity and correctness matter in software design — this package is for you.
🐞 Found a bug?
Please open an issue on GitHub:
https://github.com/IMustafaZeynali/IResultPattern/issues
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.