Myth.DependencyInjection.Providers
3.0.0-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.
See the version list below for details.
dotnet add package Myth.DependencyInjection.Providers --version 3.0.0-preview
NuGet\Install-Package Myth.DependencyInjection.Providers -Version 3.0.0-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-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-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Myth.DependencyInjection.Providers, 3.0.0-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-preview&prerelease // Install Myth.DependencyInjection.Providers as a Cake Tool #tool nuget:?package=Myth.DependencyInjection.Providers&version=3.0.0-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Myth.DependencyInjection.Providers
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 | Versions 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.
-
net8.0
- Asp.Versioning.Mvc (>= 8.1.0)
- Asp.Versioning.Mvc.ApiExplorer (>= 8.1.0)
- AutoMapper (>= 13.0.1)
- Myth.DependencyInjection (>= 3.0.0-preview)
- Myth.Repository (>= 3.0.0-preview)
- Swashbuckle.AspNetCore (>= 6.6.2)
- Swashbuckle.AspNetCore.Annotations (>= 6.6.2)
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.1-preview | 63 | 6/29/2024 |
3.0.0-preview | 59 | 6/28/2024 |