OttoMapper.Extensions 1.0.2

dotnet add package OttoMapper.Extensions --version 1.0.2
                    
NuGet\Install-Package OttoMapper.Extensions -Version 1.0.2
                    
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="OttoMapper.Extensions" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OttoMapper.Extensions" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OttoMapper.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OttoMapper.Extensions --version 1.0.2
                    
#r "nuget: OttoMapper.Extensions, 1.0.2"
                    
#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.
#:package OttoMapper.Extensions@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OttoMapper.Extensions&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OttoMapper.Extensions&version=1.0.2
                    
Install as a Cake Tool

OttoMapper

OttoMapper is a fast object mapping library for .NET with an API that is intentionally close to common AutoMapper usage patterns.

Why "Otto"?

Otto is a quintessentially German name — and so is the author. OttoMapper is a lightweight alternative to AutoMapper, so think of it as the Teutonic take on object mapping. A pun, basically.

Packages

  • OttoMapper.Mapping - core mapping engine
  • OttoMapper.Extensions - dependency injection integration for ASP.NET Core

Features

  • CreateMap<TSource, TDestination>()
  • Profile support
  • RequireExplicitMaps
  • AssertConfigurationIsValid()
  • nested mapping
  • collection mapping
  • ForMember(..., opt => opt.MapFrom(...))
  • Ignore()
  • Condition(...)
  • NullSubstitute(...)
  • ReverseMap()
  • ForPath(...)
  • BeforeMap(...) and AfterMap(...)
  • ConvertUsing(...)
  • ConstructUsing(...)
  • Map<TDestination>(object source)

Basic usage

var config = new MapperConfiguration(cfg =>
{
    cfg.RequireExplicitMaps = true;

    cfg.CreateMap<AddressSource, AddressDestination>();
    cfg.CreateMap<OrderSource, OrderDestination>()
        .ForMember(d => d.Name, opt => opt.MapFrom(s => s.DisplayName))
        .ForMember(d => d.Description, opt =>
        {
            opt.Condition(s => !string.IsNullOrWhiteSpace(s.Description));
            opt.NullSubstitute("n/a");
            opt.MapFrom(s => s.Description);
        })
        .ReverseMap();
});

config.AssertConfigurationIsValid();

var mapper = config.BuildMapper();
var dto = mapper.Map<OrderDestination>(source);

ASP.NET Core

builder.Services.AddOttoMapper(typeof(MyProfile).Assembly);

or

builder.Services.AddOttoMapper(cfg =>
{
    cfg.RequireExplicitMaps = true;
}, typeof(MyProfile).Assembly);

Notes

OttoMapper is not a drop-in replacement for AutoMapper. It targets API compatibility with AutoMapper 14 for the most common mapping scenarios — CreateMap, profiles, ForMember/ForPath, conditions, reverse maps, hooks, nested and collection mapping — but it deliberately does not aim for full feature parity. If your project uses only the common subset of AutoMapper 14's API, migrating to OttoMapper should require minimal effort.

License

OttoMapper is licensed under the MIT License. See the LICENSE file in the repository root for the full license text.

Repository

https://github.com/HolgerTheHuck/OttoMapper

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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
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
1.0.2 92 5/4/2026
1.0.1 112 4/2/2026
1.0.0 103 3/30/2026

Updated dependency to OttoMapper.Mapping 1.0.2 with case-insensitive and underscore-ignoring property mapping support.