Skip to content

OutResp is a response wrapper. It provides a response pattern concentrating notifications and validations to use in your workflow.

License

Notifications You must be signed in to change notification settings

LuizFelipeA/OutResp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OutResp

OutResp is a response wrapper. It provides a response pattern concentrating notifications and validations to use in your workflow.

Package Version Downloads
OutResp NuGet Nuget

Dependencies

.NET Core 6

Instalation

This package is available through Nuget Packages: https://www.nuget.org/packages/OutResp

Nuget

Install-Package OutResp

.NET CLI

dotnet add package OutResp

How to use

public IOutResp ValidateName(string name)
{
    if(string.IsNullOrEmpty(name))
        return OutRespContract
            .Failure<dynamic>()
            .AddStatusCode(HttpStatusCode.BadRequest)
            .AddMessage("Invalid name.");


    return OutRespContract
        .Success<dynamic>()
        .AddStatusCode(HttpStatusCode.OK)
        .AddMessage("Valid name.")
        .AddValue(
            new
            {
                Data = ...
            });
}

Check out our Getting started guide of how to use OutResp in your application and get the most out of it!

OutResp is Copyright © 2022 Luiz Felipe, and other contributors under the MIT license.

About

OutResp is a response wrapper. It provides a response pattern concentrating notifications and validations to use in your workflow.

Topics

Resources

License

Stars

Watchers

Forks

Languages