Riok.Mapperly 3.6.0
Mapperly
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.Should().Be(10);
Read the docs for any further information.
Upgrading
Find a list of breaking changes for each major version and upgrade guides here.
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
|
3 |
|
Volo.Abp.Mapperly
Package Description
|
2 |
3.6.0 (2024-06-18)
Bug Fixes
- correct syntax in nameof clause of throw null exceptions (#1263) (3d43a6f)
- fixes using the wrong object factory when multiple factories with the same target type but different source types are used (#1313) (51aa1da)
- In disable nullable reference type contexts do not assume nullable IQueryable generic types (#1268) (56b03d2)
- prefer coalesce operator over if-else to simplify generated source code (#1262) (b4548d2)
Features
.NET Standard 2.0
- No dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 4.3.1-next.0 | 4 | 12/12/2025 |
| 4.3.0 | 3 | 12/12/2025 |
| 4.3.0-next.6 | 3 | 12/12/2025 |
| 4.3.0-next.5 | 3 | 12/12/2025 |
| 4.3.0-next.4 | 3 | 12/12/2025 |
| 4.3.0-next.3 | 3 | 12/12/2025 |
| 4.3.0-next.2 | 3 | 12/12/2025 |
| 4.3.0-next.1 | 3 | 12/12/2025 |
| 4.3.0-next.0 | 3 | 12/12/2025 |
| 4.2.1 | 3 | 12/12/2025 |
| 4.2.1-next.2 | 3 | 12/12/2025 |
| 4.2.1-next.1 | 3 | 12/12/2025 |
| 4.2.1-next.0 | 3 | 12/12/2025 |
| 4.2.0 | 3 | 12/12/2025 |
| 4.2.0-next.2 | 2 | 12/12/2025 |
| 4.2.0-next.1 | 3 | 12/12/2025 |
| 4.2.0-next.0 | 3 | 12/12/2025 |
| 4.1.1 | 3 | 12/12/2025 |
| 4.1.1-next.0 | 3 | 12/12/2025 |
| 4.1.0 | 3 | 12/12/2025 |
| 4.1.0-next.3 | 3 | 12/12/2025 |
| 4.1.0-next.2 | 1 | 12/12/2025 |
| 4.1.0-next.1 | 3 | 12/12/2025 |
| 4.1.0-next.0 | 3 | 12/12/2025 |
| 4.0.0 | 3 | 12/12/2025 |
| 4.0.0-next.4 | 3 | 12/12/2025 |
| 4.0.0-next.3 | 3 | 12/12/2025 |
| 4.0.0-next.2 | 3 | 12/12/2025 |
| 4.0.0-next.1 | 3 | 12/12/2025 |
| 3.6.0 | 3 | 12/12/2025 |
| 3.6.0-next.2 | 3 | 12/12/2025 |
| 3.6.0-next.1 | 3 | 12/12/2025 |
| 3.5.1 | 3 | 12/12/2025 |
| 3.5.1-next.2 | 3 | 12/12/2025 |
| 3.5.1-next.1 | 1 | 12/12/2025 |
| 3.5.0 | 3 | 12/12/2025 |
| 3.5.0-next.4 | 2 | 12/12/2025 |
| 3.5.0-next.3 | 3 | 12/12/2025 |
| 3.5.0-next.2 | 3 | 12/12/2025 |
| 3.5.0-next.1 | 3 | 12/12/2025 |
| 3.4.0 | 4 | 12/12/2025 |
| 3.4.0-next.5 | 3 | 12/12/2025 |
| 3.4.0-next.4 | 3 | 12/12/2025 |
| 3.4.0-next.3 | 1 | 12/12/2025 |
| 3.4.0-next.2 | 3 | 12/12/2025 |
| 3.4.0-next.1 | 3 | 12/12/2025 |
| 3.3.1-next.1 | 2 | 12/12/2025 |
| 3.3.0 | 3 | 12/12/2025 |
| 3.3.0-next.6 | 3 | 12/12/2025 |
| 3.3.0-next.5 | 3 | 12/12/2025 |
| 3.3.0-next.4 | 3 | 12/12/2025 |
| 3.3.0-next.3 | 3 | 12/12/2025 |
| 3.3.0-next.2 | 4 | 12/12/2025 |
| 3.3.0-next.1 | 3 | 12/12/2025 |
| 3.2.0 | 3 | 12/12/2025 |
| 3.2.0-next.4 | 3 | 12/12/2025 |
| 3.2.0-next.3 | 2 | 12/12/2025 |
| 3.2.0-next.2 | 3 | 12/12/2025 |
| 3.2.0-next.1 | 3 | 12/12/2025 |
| 3.1.0 | 3 | 12/12/2025 |
| 3.1.0-next.2 | 2 | 12/12/2025 |
| 3.1.0-next.1 | 3 | 12/12/2025 |
| 3.0.0 | 1 | 12/12/2025 |
| 3.0.0-next.1 | 3 | 12/12/2025 |
| 2.9.0-next.4 | 3 | 12/12/2025 |
| 2.9.0-next.3 | 3 | 12/12/2025 |
| 2.9.0-next.2 | 3 | 12/12/2025 |
| 2.9.0-next.1 | 3 | 12/12/2025 |
| 2.8.0 | 3 | 12/12/2025 |
| 2.8.0-next.2 | 3 | 12/12/2025 |
| 2.8.0-next.1 | 1 | 12/12/2025 |
| 2.7.1-next.1 | 3 | 12/11/2025 |
| 2.7.0 | 3 | 12/12/2025 |
| 2.7.0-next.2 | 3 | 12/12/2025 |
| 2.7.0-next.1 | 3 | 12/12/2025 |
| 2.6.0 | 3 | 12/12/2025 |
| 2.6.0-next.4 | 3 | 12/12/2025 |
| 2.6.0-next.3 | 1 | 12/12/2025 |
| 2.6.0-next.2 | 3 | 12/12/2025 |
| 2.6.0-next.1 | 3 | 12/12/2025 |
| 2.5.0 | 3 | 12/12/2025 |
| 2.5.0-next.2 | 3 | 12/12/2025 |
| 2.5.0-next.1 | 3 | 12/12/2025 |
| 2.4.1-next.1 | 3 | 12/12/2025 |
| 2.4.0 | 3 | 12/12/2025 |
| 2.3.3 | 3 | 12/12/2025 |
| 2.3.2 | 3 | 12/12/2025 |
| 2.3.1 | 3 | 12/12/2025 |
| 2.3.0 | 1 | 12/12/2025 |
| 2.2.1 | 3 | 12/12/2025 |
| 2.2.0 | 2 | 12/12/2025 |
| 2.1.0 | 3 | 12/12/2025 |
| 2.0.0 | 3 | 12/12/2025 |