DotRMapper 1.0.0

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

DotRMapper

.NET 8 License: MIT

DotRMapper is a convention-based object-to-object mapper for .NET. It eliminates repetitive mapping code by automatically copying properties between types and providing a fluent API for custom transformations — similar to AutoMapper.


Table of Contents


Features

Feature Description
Convention-based mapping Automatically maps properties with matching names (case-insensitive)
Fluent configuration Customize individual members with ForMember
Profiles Group related mappings into reusable Profile classes
Reverse mappings Generate inverse mappings with ReverseMap()
Collection mapping Maps arrays, lists, and IEnumerable<T>
Nested object mapping Recursively maps complex object graphs
Custom resolvers Plug in IValueResolver implementations
Type converters Transform values with ITypeConverter
Before/After hooks Run callbacks before or after mapping
Configuration validation Detect unmapped members with AssertConfigurationIsValid()

Installation

Add a project reference to the library:

dotnet add reference path/to/DotRMapper/DotRMapper.csproj

Or, once published to NuGet:

dotnet add package DotRMapper

Requirements: .NET 8.0 or later.


Quick Start

1. Define your types

public class Source
{
    public int Id { get; set; }
    public string FirstName { get; set; } = string.Empty;
    public string LastName { get; set; } = string.Empty;
}

public class Destination
{
    public int Id { get; set; }
    public string FirstName { get; set; } = string.Empty;
    public string LastName { get; set; } = string.Empty;
    public string FullName { get; set; } = string.Empty;
}

2. Configure the mapper

using DotRMapper;
using DotRMapper.Abstractions.Configuration;

var config = new MapperConfiguration(cfg =>
{
    cfg.CreateMap<Source, Destination>()
        .ForMember(dest => dest.FullName, opt => opt.MapFrom(src => $"{src.FirstName} {src.LastName}"));
});

config.AssertConfigurationIsValid();
var mapper = config.CreateMapper();

3. Map objects

var source = new Source { Id = 1, FirstName = "John", LastName = "Doe" };
var destination = mapper.Map<Source, Destination>(source);

// destination.FullName == "John Doe"

Documentation

Document Description
Getting Started Step-by-step introduction
Configuration Guide Full configuration reference
Examples Real-world usage patterns

Running Tests

dotnet test

The test suite covers convention mapping, custom members, collections, profiles, reverse maps, validation, and enum conversions.


Project Structure

rimapper/
├── src/
│   └── DotRMapper/
│       ├── Abstractions/       # Public contracts (interfaces, Profile, ResolutionContext)
│       │   ├── Configuration/
│       │   ├── Converters/
│       │   └── Resolvers/
│       ├── Configuration/      # Mapping configuration implementations
│       ├── Internal/           # Engine and internal types
│       ├── Mapper.cs
│       └── MapperConfiguration.cs
├── tests/
│   └── DotRMapper.Tests/
├── docs/
└── DotRMapper.sln

Namespaces

Namespace Purpose
DotRMapper.Abstractions Core interfaces (IMapper, ResolutionContext)
DotRMapper.Abstractions.Configuration Configuration contracts and Profile
DotRMapper.Abstractions.Resolvers IValueResolver
DotRMapper.Abstractions.Converters ITypeConverter
DotRMapper Entry points (Mapper, MapperConfiguration)

License

This project is licensed under the MIT License.

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 was computed.  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.
  • net8.0

    • No dependencies.

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.0 119 7/17/2026