Skip to content
Enzo Thomazi Lucas edited this page Jan 27, 2023 · 6 revisions

The library that helps you not to repeat code or worry about standard things.

First steps

To begin using the full library, you have to use thi command:

dotnet add package enzotlucas.DevKit --prerelease

After that, to apply the library into your project, you have to add this methods:

//This adds api versioning, api documentation, request validation (MediatR) and custom logging (optional)
public static WebApplicationBuilder ConfigureServices(this WebApplicationBuilder builder)
{
    builder.Services.AddDevKit(); // This version don't have custom log managment

    builder.Services.AddDevKit(LoggerProvider.Console); // This version have custom log managment

    //Some code...
}

//This adds all midlewares and apply the api documentation
public static WebApplication ConfigureApp(this WebApplication app)
{
    app.UseDevKit();

    //Some code...
}

Bellow you can read everything you need to know about the library to use it, to use the library at full potential, is important to read about the Mandatory steps.

Clone this wiki locally