DeltaMapper.EFCore 1.2.0

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

DeltaMapper

Fast, diff-aware .NET object mapper. MIT licensed. Minimal dependencies.

Why DeltaMapper?

  • Near-zero overhead — source-generated direct calls run at 7 ns, same as hand-written code
  • MappingDiff<T> — map and get a structured change set in one call
  • Source generator[GenerateMap] emits assignment code at build time, zero reflection; [IgnoreMember], [MapMember], and [NullSubstitute] attributes customize maps without runtime Profiles
  • Full IMapper pipeline — DI, middleware, hooks, EF Core proxy detection, OpenTelemetry tracing
  • ProjectTo<T>() — translate profile maps into EF Core-compatible SQL projections via IQueryable

Install

dotnet add package DeltaMapper                    # core runtime
dotnet add package DeltaMapper.SourceGen          # optional: compile-time codegen
dotnet add package DeltaMapper.EFCore             # optional: EF Core proxy awareness + ProjectTo
dotnet add package DeltaMapper.OpenTelemetry      # optional: Activity spans

Requires .NET 8+ (binaries for net8.0, net9.0, and net10.0).

Quick Start

public class UserProfile : Profile
{
    public UserProfile()
    {
        CreateMap<User, UserDto>()
            .ForMember(d => d.FullName, o => o.MapFrom(s => $"{s.First} {s.Last}"))
            .ReverseMap();
    }
}

var mapper = MapperConfiguration.Create(cfg => cfg.AddProfile<UserProfile>())
    .CreateMapper();

var dto = mapper.Map<User, UserDto>(user);

Built-in Change Tracking

var diff = mapper.Patch(updateDto, existingUser);

if (diff.HasChanges)
    await auditLog.RecordAsync(userId, diff.Changes);

EF Core ProjectTo

Project directly from an IQueryable to a DTO — EF Core translates the mapping expression to SQL.

var config = MapperConfiguration.Create(cfg => cfg.AddProfile<OrderProfile>());

var dtos = await dbContext.Orders
    .Where(o => o.IsActive)
    .ProjectTo<Order, OrderDto>(config)
    .ToListAsync();

Flattening and Unflattening

Nested objects are flattened to flat DTOs and back automatically — no configuration required.

// Order.Customer.Name → CustomerName (flattening)
CreateMap<Order, OrderFlatDto>();

// CustomerName → Customer.Name (unflattening)
CreateMap<OrderFlatDto, Order>();

Assembly Scanning

// Register all profiles in an assembly in one call
cfg.AddProfilesFromAssemblyContaining<UserProfile>();

Type Converters

// Apply a conversion across every map that has a matching type pair
cfg.CreateTypeConverter<string, DateTime>(s => DateTime.Parse(s));

Conditional Mapping

// Skip mapping a property when a condition is not met
CreateMap<Order, OrderDto>()
    .ForMember(d => d.Discount, o => o.Condition(s => s.IsPremiumCustomer));

Source Generator Attributes

Customize compile-time maps with attributes on the partial profile class — no runtime Profile required.

[GenerateMap(typeof(User), typeof(UserDto))]
[IgnoreMember(typeof(User), typeof(UserDto), nameof(UserDto.InternalId))]
[MapMember(typeof(User), typeof(UserDto), nameof(UserDto.FullName), nameof(User.Name))]
[NullSubstitute(typeof(User), typeof(UserDto), nameof(UserDto.DisplayName), "Anonymous")]
public partial class UserMappingProfile { }
Attribute Effect
[IgnoreMember(src, dst, member)] Exclude a destination member from the generated map
[MapMember(src, dst, dstMember, srcMember)] Map a source member to a differently named destination member
[NullSubstitute(src, dst, member, value)] Use value when the source member is null

Requires DeltaMapper.SourceGen.

Performance

What's being mapped DeltaMapper vs Mapperly vs AutoMapper
Simple object (5 properties) 7 ns Same speed 7x faster
Nested object (parent + child) 24 ns Same speed, 33% less memory 2x faster
Collection (10 items) 22 ns 5x faster, 8x less memory 8x faster

Getting Help

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.2.0 333 4/7/2026
1.1.0 96 4/6/2026
1.0.0 119 4/2/2026
1.0.0-rc.8 60 3/23/2026
1.0.0-rc.7 54 3/21/2026
1.0.0-rc.6 53 3/21/2026
1.0.0-rc.5 51 3/21/2026
1.0.0-rc.4 51 3/20/2026
1.0.0-rc.3 51 3/20/2026
1.0.0-rc.2 52 3/20/2026
1.0.0-rc.1 54 3/19/2026
0.2.0-alpha 89 3/19/2026
0.1.0-alpha 93 3/18/2026