Myth.DependencyInjection.Providers 3.0.0.1-preview

This is a prerelease version of Myth.DependencyInjection.Providers.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Myth.DependencyInjection.Providers --version 3.0.0.1-preview                
NuGet\Install-Package Myth.DependencyInjection.Providers -Version 3.0.0.1-preview                
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="Myth.DependencyInjection.Providers" Version="3.0.0.1-preview" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Myth.DependencyInjection.Providers --version 3.0.0.1-preview                
#r "nuget: Myth.DependencyInjection.Providers, 3.0.0.1-preview"                
#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.
// Install Myth.DependencyInjection.Providers as a Cake Addin
#addin nuget:?package=Myth.DependencyInjection.Providers&version=3.0.0.1-preview&prerelease

// Install Myth.DependencyInjection.Providers as a Cake Tool
#tool nuget:?package=Myth.DependencyInjection.Providers&version=3.0.0.1-preview&prerelease                

Myth.DependencyInjection.Providers

NuGet Version NuGet Version

License

pt-br en

It is a .NET library to perform dependency injection for pre-configured third-party libraries.

⭐ Features

  • Add versioning
  • Adds versioned Swagger
  • Adds AutoMapper with pagination settings
  • Adds methods to make using AutoMapper easier

🔮 Usage

To use, simply use the functions you need in the Startup of your application.

services.AddVersioning( 1 );                      // For versioning
services.AddSwaggerVersioned( settings => {       // To add versioned Swagger
  settings.Title = "API Test";
  settings.Description = "This is an API test";
  settings.Options.UseBasicAuthorization( );
} );
services.AddTypeMapping( );                      // To add type mapping

👓 Observations

🔢 Versioning

For the vesionation to work correctly, the controllers must have the following format:

[ApiController]
[ApiVersion( "1.0" )]
[Route( "api/v{version:apiVersion}/[controller]" )]
internal class MyController : ControllerBase {

  ...

}

🗺️ Type Mapping

The following static methods will be available to use and perform mapping at any time:

  • .MapTo<DestinationType>(): Maps to the destination type
  • .MapToAsync<SourceType, DestinationType>(): Maps to the destination type asynchronously
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.0.2-preview 66 12/10/2024
3.0.0.1-preview 90 6/29/2024
3.0.0 71 12/10/2024
3.0.0-preview 96 6/28/2024