Riok.Mapperly 3.0.0-next.1

Mapperly

Nuget Nuget Preview GitHub Downloads GitHub

Mapperly is a .NET source generator for generating object mappings. Inspired by MapStruct.

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.Should().Be(10);

Read the docs for any further information.

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.

Showing the top 20 packages that depend on Riok.Mapperly.

Packages Downloads
Volo.Abp.Mapperly
Package Description
1

# [3.0.0-next.1](https://github.com/riok/mapperly/compare/v2.9.0-next.4...v3.0.0-next.1) (2023-08-02) ### Bug Fixes * handle internal visibility correctly ([#597](https://github.com/riok/mapperly/issues/597)) ([5d4596a](https://github.com/riok/mapperly/commit/5d4596a2e963032b5d61be627f99581649868368)) * improve performance for member resolution ([#603](https://github.com/riok/mapperly/issues/603)) ([641c1bf](https://github.com/riok/mapperly/commit/641c1bf594f751c0aaf30aa7403e1fc862cd37ef)) * make all attributes sealed ([#614](https://github.com/riok/mapperly/issues/614)) ([24614c0](https://github.com/riok/mapperly/commit/24614c0f9b0350bf1af1a42a6049a316947850d0)) * prevent mapping backing field ([#608](https://github.com/riok/mapperly/issues/608)) ([d768dbb](https://github.com/riok/mapperly/commit/d768dbb4f74a889cf91784721a2b2a257744386c)) * remove obsolete MapperIgnoreAttribute ([#611](https://github.com/riok/mapperly/issues/611)) ([c7a5099](https://github.com/riok/mapperly/commit/c7a509966a714dbb5bce92306798e1fe0196de60)) ### Features * Map all accessible members by default ([#597](https://github.com/riok/mapperly/issues/597)) ([#612](https://github.com/riok/mapperly/issues/612)) ([3d2ed69](https://github.com/riok/mapperly/commit/3d2ed699119da04213d8e3303fc56471e411a770)) ### BREAKING CHANGES * mark all attributes as sealed * Include accessible internal and private members in mappings * Obsolete MapperIgnoreAttribute is removed and needs to be replaced with MapperIgnoreTargetAttribute

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
4.3.0-next.5 1 2025/10/9
4.3.0-next.4 2 2025/10/4
4.3.0-next.3 2 2025/10/5
4.3.0-next.2 2 2025/10/5
4.3.0-next.1 2 2025/10/5
4.3.0-next.0 1 2025/10/5
4.2.1 1 2025/10/5
4.2.1-next.2 2 2025/10/5
4.2.1-next.1 1 2025/10/5
4.2.1-next.0 1 2025/10/5
4.2.0 1 2025/10/5
4.2.0-next.2 2 2025/10/5
4.2.0-next.1 1 2025/10/5
4.2.0-next.0 1 2025/10/5
4.1.1 1 2025/10/5
4.1.1-next.0 1 2025/10/5
4.1.0 1 2025/10/5
4.1.0-next.3 2 2025/10/5
4.1.0-next.2 2 2025/10/6
4.1.0-next.1 2 2025/10/5
4.1.0-next.0 1 2025/10/5
4.0.0 2 2025/10/5
4.0.0-next.4 1 2025/10/5
4.0.0-next.3 2 2025/10/5
4.0.0-next.2 1 2025/10/5
4.0.0-next.1 1 2025/10/5
3.6.0 1 2025/10/5
3.6.0-next.2 2 2025/10/5
3.6.0-next.1 1 2025/10/5
3.5.1 2 2025/10/5
3.5.1-next.2 2 2025/10/5
3.5.1-next.1 2 2025/10/5
3.5.0 1 2025/10/5
3.5.0-next.4 1 2025/10/5
3.5.0-next.3 2 2025/10/5
3.5.0-next.2 2 2025/10/5
3.5.0-next.1 2 2025/10/5
3.4.0 1 2025/10/5
3.4.0-next.5 2 2025/10/5
3.4.0-next.4 3 2025/10/5
3.4.0-next.3 2 2025/10/5
3.4.0-next.2 2 2025/10/5
3.4.0-next.1 2 2025/10/5
3.3.1-next.1 1 2025/10/5
3.3.0 1 2025/10/5
3.3.0-next.6 2 2025/10/5
3.3.0-next.5 2 2025/10/5
3.3.0-next.4 2 2025/10/5
3.3.0-next.3 2 2025/10/5
3.3.0-next.2 2 2025/10/5
3.3.0-next.1 1 2025/10/5
3.2.0 1 2025/10/5
3.2.0-next.4 2 2025/10/5
3.2.0-next.3 2 2025/10/5
3.2.0-next.2 1 2025/10/5
3.2.0-next.1 1 2025/10/5
3.1.0 1 2025/10/5
3.1.0-next.2 2 2025/10/5
3.1.0-next.1 1 2025/10/5
3.0.0 2 2025/10/5
3.0.0-next.1 1 2025/10/5
2.9.0-next.4 2 2025/10/5
2.9.0-next.3 2 2025/10/5
2.9.0-next.2 2 2025/10/5
2.9.0-next.1 2 2025/10/5
2.8.0 1 2025/10/5
2.8.0-next.2 2 2025/10/5
2.8.0-next.1 2 2025/10/5
2.7.1-next.1 1 2025/10/5
2.7.0 1 2025/10/5
2.7.0-next.2 1 2025/10/5
2.7.0-next.1 1 2025/10/5
2.6.0 1 2025/10/5
2.6.0-next.4 2 2025/10/5
2.6.0-next.3 1 2025/10/5
2.6.0-next.2 1 2025/10/5
2.6.0-next.1 1 2025/10/5
2.5.0 1 2025/10/5
2.5.0-next.2 1 2025/10/5
2.5.0-next.1 1 2025/10/5
2.4.1-next.1 1 2025/10/5
2.4.0 1 2025/10/5
2.3.3 1 2025/10/5
2.3.2 1 2025/10/5
2.3.1 1 2025/10/5
2.3.0 1 2025/10/5
2.2.1 1 2025/10/5
2.2.0 1 2025/10/5
2.1.0 1 2025/10/6
2.0.0 2 2025/10/5