Easy-Mapper 1.0.1

dotnet add package Easy-Mapper --version 1.0.1
                    
NuGet\Install-Package Easy-Mapper -Version 1.0.1
                    
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="Easy-Mapper" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Easy-Mapper" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Easy-Mapper" />
                    
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 Easy-Mapper --version 1.0.1
                    
#r "nuget: Easy-Mapper, 1.0.1"
                    
#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 Easy-Mapper@1.0.1
                    
#: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=Easy-Mapper&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Easy-Mapper&version=1.0.1
                    
Install as a Cake Tool

EasyMapper

NuGet License: MIT

EasyMapper is a blazing-fast, reflection-free object mapper for .NET 8 and .NET 9 โ€” designed as a free alternative to AutoMapper.

It uses IL emission, expression trees, and runtime caching to deliver mapping speeds close to handwritten code.


๐Ÿš€ Features

  • โšก Up to 2โ€“3ร— faster than AutoMapper
  • ๐Ÿง  Zero reflection at runtime
  • ๐Ÿ” Nested object mapping supported
  • ๐ŸŽฏ Ignore, CustomMap, and ValueConverter per member
  • ๐Ÿงฉ Thread-safe and cache-optimized
  • ๐Ÿงฐ Works with Dependency Injection (AddEasyMapper)
  • โœ… Free for commercial use (MIT license)
  • ๐Ÿงฑ Compatible with NativeAOT

๐Ÿ“ฆ Installation

dotnet add package EasyMapper

๐Ÿงฐ Basic Usage

using EasyMapper;
using EasyMapper.Configuration;

// Configure mappings once at startup
MapperConfig.CreateMap<UserDto, User>();

// Map objects
var user = EasyMapper.Map<UserDto, User>(new UserDto
{
    Name = "Alice",
    Age = 25
});

๐Ÿงฉ Advanced Configuration

MapperConfig.CreateMap<UserDto, User>()
    .ForMember("Age", opt => opt.ValueConverter = a => (int)a! + 1)
    .ForMember("Name", opt => opt.CustomMap = src => src.Name.ToUpper())
    .IgnoreMember("Password");

๐Ÿ” In-Place Mapping

var source = new UserDto { Name = "Bob", Age = 30 };
var destination = new User();

EasyMapper.Map(source, destination);

๐Ÿงฑ Dependency Injection

builder.Services.AddEasyMapper();

Then inject anywhere:

public class MyService
{
    private readonly IMappingEngine _mapper;

    public MyService(IMappingEngine mapper)
    {
        _mapper = mapper;
    }

    public void DoSomething(UserDto dto)
    {
        var entity = _mapper.Map<UserDto, User>(dto);
    }
}

๐Ÿงช Benchmark (Intel i5-8350U, .NET 9.0)

Mapper Time (ns) Relative Alloc (B)
Handwritten 18.49 ns 1.00ร— 96 B
EasyMapper (new) 54.98 ns 2.97ร— 96 B
EasyMapper (in place) 42.10 ns 2.28ร— 24 B
AutoMapper 88.18 ns 4.77ร— 96 B

๐Ÿงพ License

Licensed under the MIT License โ€” completely free for commercial and personal use.


โค๏ธ Author

Muammar Siddiqui
๐Ÿ“ฆ NuGet โ€ข ๐ŸŒ GitHub

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.1 178 10/29/2025
1.0.0 176 10/29/2025