Skip to content

Transitio.Dependency

Hitesh Kumar edited this page Jul 15, 2026 · 2 revisions

Transitio.Dependency

Dependency injection integration for Transitio.Mapper — assembly scanning, configurable lifetimes, fail-fast validation, and keyed mappers, built on Microsoft.Extensions.DependencyInjection.

NuGet

Table of Contents


Installation

dotnet add package Transitio.Dependency

Requirements: .NET 8.0 or later (net8.0, net10.0).


Quick Start

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);
}

Features

  • 📦 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 for IServiceCollection

Dependencies

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.


Documentation

See the Changelog for full release history.


License

Licensed under the MIT License.


FAQ

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.

Clone this wiki locally