RepositoryC#CHSwitzerland
RI

riok/mapperly

A .NET source generator for generating object mappings. No runtime reflection.

4.2kstars
235forks
53issues
7views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: csharp-sourcegenerator

#1 Repository of the week

2
TINIX TRENDING·Topic: roslyn

#2 Repository of the week

2
TINIX TRENDING·Topic: dotnet-core

#2 Repository of the week

Mapperly

Nuget Nuget Preview License Downloads GitHub Sponsors GitHub

Mapperly is a .NET source generator for generating object mappings.

Because Mapperly creates the mapping code at build time, there is minimal overhead at runtime. Even better, the generated code is perfectly readable, allowing you to verify the generated mapping code easily.

Documentation

The documentation is available here.

Quickstart

Installation

Add the NuGet Package to your project:

dotnet add package Riok.Mapperly

Create your first mapper

Create a mapper declaration as a partial class and apply the Riok.Mapperly.Abstractions.MapperAttribute attribute. Mapperly generates mapping method implementations for the defined mapping methods in the mapper.

// Mapper declaration
[Mapper]
public partial class CarMapper
{
    public partial CarDto CarToCarDto(Car car);
}

// Mapper usage
var mapper = new CarMapper();
var car = new Car { NumberOfSeats = 10, ... };
var dto = mapper.CarToCarDto(car);
dto.NumberOfSeats.ShouldBe(10);

Read the docs for any further information.

Release Channels

Mapperly is distributed through two release channels:

  • Stable Channel: Production-ready releases with full support for the latest release. Install the latest stable version for production use. Subject to semantic versioning (breaking changes only in major version bumps).
  • Next Channel: Preview releases with upcoming features and improvements. These versions may contain breaking changes and are not subject to semantic versioning. Use for testing and early access to new features.

Support Policy

Only the latest version released on the stable channel is fully supported. We strive to support all .NET versions that are currently supported by Microsoft.

Upgrading

Find a list of breaking changes for each major version and upgrade guides here.

Support

Need assistance with Mapperly or looking for consulting services? The riok team is available to help with:

  • Enterprise support and training
  • Architecture consultation
  • Custom feature development and integration support
  • Performance optimization and code reviews

Reach out through GitHub Discussions for questions, or contact the riok team directly for professional consulting services at hello@riok.ch. You can also support the project and get priority support through GitHub Sponsors.

How To Contribute

We would love for you to contribute to Mapperly and help make it even better than it is today! Find information on how to contribute in the docs.

License

Mapperly is Apache 2.0 licensed.

Similar Projects

Discover other similar projects and AI models.

RepositoryC#
AvaloniaUI/Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The future of .NET UI

31.9k
Nov 27, 2026
RepositoryC#
bitwarden/server

Bitwarden infrastructure/backend (API, database, Docker, etc).

20.8k
Dec 1, 2026
RepositoryC#
abpframework/abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.

14.5k
Nov 25, 2026
RepositoryC#
dotnet/BenchmarkDotNet

Powerful .NET library for benchmarking

11.5k
Dec 1, 2026
RepositoryC#
studyzy/imewlconverter

”深蓝词库转换“ 一款开源免费的输入法词库转换程序

10.6k
Nov 30, 2026
Repository
MoienTajik/AspNetCore-Developer-Roadmap

Roadmap to becoming an ASP.NET Core developer in 2026

19.7k
Jan 29, 2026
RepositoryC#
jellyfin/jellyfin

The Free Software Media System - Server Backend & API

60.0k
Dec 1, 2026
RepositoryC#
KnifeLemon/Filee

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

33.3k
Dec 2, 2026
RepositoryC#
BeyondDimension/SteamTools

🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。

27.9k
Dec 1, 2026