Repository navigation
Transitio.Dependency
Dependency injection integration for Transitio.Mapper — assembly scanning, configurable lifetimes, fail-fast validation, and keyed mappers, built on Microsoft.Extensions.DependencyInjection.
dotnet add package Transitio.DependencyRequirements: .NET 8.0 or later (net8.0, net10.0).
using Microsoft.Extensions.DependencyInjection;
services.AddTransitio(cfg =>
{
cfg.CreateMap<User, UserDto>();
});Then inject IMapper wherever needed:
public class UserService
{
private readonly IMapper _mapper;
public UserService(IMapper mapper)
{
_mapper = mapper;
}
public UserDto GetUser(User user) => _mapper.Map<UserDto>(user);
}- 📦 Assembly scanning for mapping profiles
- 🔧 Configurable service lifetimes (including scoped converters)
- ✅ Fail-fast validation of mapping configuration at startup
- 🔑 Keyed mapper support
- 🔌 Simple
AddTransitio(...)extension method forIServiceCollection
This package brings in:
-
Microsoft.Extensions.DependencyInjection(>= 8.0.0) -
Transitio.Mapper(>= 1.1.0)
You don't need to separately install Transitio.Mapper — it comes along as a dependency.
-
Dependency Injection —
AddTransitio, assembly scanning, lifetimes, validation, keyed mappers
See the Changelog for full release history.
Licensed under the MIT License.
What frameworks are supported? net8.0 and net10.0 (net9.0 is computed-compatible).
Do I need to install Transitio.Mapper separately? No — it's pulled in automatically as a dependency of this package.
Where do I report bugs or request features? Open an issue on the GitHub repo.
Older versions — should I upgrade? Yes — versions 1.0.0 through 1.0.4 are marked deprecated on NuGet as no longer maintained.
Part of the Transitio family — lightweight, dependency-light .NET libraries: Transitio.Mapper · Transitio.Dependency · Transitio.Validation · Transitio.Mediator.
Home · MIT Licensed · NuGet · GitHub · @TransitioNET