Skip to content

marcominerva/OperationResults

Repository files navigation

OperationResults

Lint Code Base CodeQL License: MIT

A set of lightweight libraries to totally decouple operation results and actual application responses.

Core library

NuGet Nuget

Installation

The library is available on NuGet. Just search for OperationResultTools in the Package Manager GUI or run the following command in the .NET CLI:

dotnet add package OperationResultTools

ASP.NET Core integration library (Controller-based project)

NuGet Nuget

Note: This is the library to use if you're working with Controller.

This library provides HttpContext extension methods to automatically map Operation Results (that may come, for example, from a business layer) to HTTP responses, along with the appropriate status codes.

A full example is available in the Samples folder. Search for the registration in the Program.cs file and the usage in Controllers folder.

Installation

The library is available on NuGet. Just search for OperationResultTools.AspNetCore in the Package Manager GUI or run the following command in the .NET CLI:

dotnet add package OperationResultTools.AspNetCore

ASP.NET Core integration library (Minimal API project)

NuGet Nuget

Note: This is the library to use if you're working with Minimal APIs.

This library provides HttpContext extension methods to automatically map Operation Results (that may come, for example, from a business layer) to HTTP responses, along with the appropriate status codes.

A full example is available in the Samples folder. Search for the registration and the usage in Program.cs file.

Installation

The library is available on NuGet. Just search for OperationResultTools.AspNetCore.Http in the Package Manager GUI or run the following command in the .NET CLI:

dotnet add package OperationResultTools.AspNetCore.Http

Contribute

The project is constantly evolving. Contributions are welcome. Feel free to file issues and pull requests on the repo and we'll address them as we can.