DotRMapper 1.0.0
dotnet add package DotRMapper --version 1.0.0
NuGet\Install-Package DotRMapper -Version 1.0.0
<PackageReference Include="DotRMapper" Version="1.0.0" />
<PackageVersion Include="DotRMapper" Version="1.0.0" />
<PackageReference Include="DotRMapper" />
paket add DotRMapper --version 1.0.0
#r "nuget: DotRMapper, 1.0.0"
#:package DotRMapper@1.0.0
#addin nuget:?package=DotRMapper&version=1.0.0
#tool nuget:?package=DotRMapper&version=1.0.0
DotRMapper
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 | Versions 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. |
-
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 |