Vickodev.Utility.BADCore.Adapters
1.0.9
dotnet add package Vickodev.Utility.BADCore.Adapters --version 1.0.9
NuGet\Install-Package Vickodev.Utility.BADCore.Adapters -Version 1.0.9
<PackageReference Include="Vickodev.Utility.BADCore.Adapters" Version="1.0.9" />
<PackageVersion Include="Vickodev.Utility.BADCore.Adapters" Version="1.0.9" />
<PackageReference Include="Vickodev.Utility.BADCore.Adapters" />
paket add Vickodev.Utility.BADCore.Adapters --version 1.0.9
#r "nuget: Vickodev.Utility.BADCore.Adapters, 1.0.9"
#:package Vickodev.Utility.BADCore.Adapters@1.0.9
#addin nuget:?package=Vickodev.Utility.BADCore.Adapters&version=1.0.9
#tool nuget:?package=Vickodev.Utility.BADCore.Adapters&version=1.0.9
Agile Development Box for .Net (BAD Core Adapters)
BAD Core is a utility tools for the agile development of applications and APIs in .Net under a Work Flow approach.
Philosophy
Worry about your business rules and trivial, repetitive things and handle them with BAD Core through the standardization of a workflow.
Included tools
For a workflow we design the following tools that will help you control the input and output of your use cases.
HttpSatusMapping: is a class to manage application status and it contains de correspondig HttpStatusCode for an AplicationStatusCode.
ControllerExtension: is a class to manage the response througtIActionResultinterface or througt a simple BaseResult.
ProducesApplicationResponseTypeAttribute: is a simple Attributte controller to help us to mapping ApplicationStatusCode to HttpStatusCode.
JsonUtil: is a tool class with which you can deserialize/serialize objects in Json format to object models and viceversa.
Example of use
namespace Controllers.Weather
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController(IServiceManager<BaseUseCase> apiServiceManager) : ControllerBase
{
private readonly IServiceManager<BaseUseCase> ApiServiceManager = apiServiceManager;
[HttpGet(nameof(GetWeatherForecast))]
[Produces("application/json")]
[ProducesApplicationResponseType(typeof(BaseResult<IEnumerable<WeatherForecast>>), (int)HttpStatusCode.OK, ApplicationStatusCodes.SUCCESSFUL)]
[ProducesApplicationResponseType(typeof(BaseResult), (int)HttpStatusCode.BadRequest, ApplicationStatusCodes.INVALID_INPUT)]
public async Task<IActionResult> GetWeatherForecast()
{
// Here we call the use case through the service manager and handle the result data through the controller extension in a clean way
return await this.HandleActionResultDataAsync(
this.ApiServiceManager.GetUseCaseService<GetWeatherForecastUseCase>()?.Execute(this.GetUseCaseTrace())
);
/* Or you can get the all result response using HandleActionResultAsync instead of HandleActionResultDataAsync
return await this.HandleActionResultAsync(
// this.ApiServiceManager.GetUseCaseService<GetWeatherForecastUseCase>()?.Execute(this.GetUseCaseTrace())
);
*/
}
// Add other endpoints here accordingly to your needs
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- Vickodev.Utility.BADCore.Application (>= 1.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Separating layers