IResultPattern 1.5.1

dotnet add package IResultPattern --version 1.5.1
                    
NuGet\Install-Package IResultPattern -Version 1.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IResultPattern" Version="1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IResultPattern" Version="1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="IResultPattern" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IResultPattern --version 1.5.1
                    
#r "nuget: IResultPattern, 1.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IResultPattern@1.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IResultPattern&version=1.5.1
                    
Install as a Cake Addin
#tool nuget:?package=IResultPattern&version=1.5.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last Updated
1.5.1 93 2/19/2026
1.5.0 88 2/19/2026
1.4.1 93 2/4/2026
1.4.0 100 2/4/2026