Riok.Mapperly 3.5.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Riok.Mapperly --version 3.5.1
NuGet\Install-Package Riok.Mapperly -Version 3.5.1
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="Riok.Mapperly" Version="3.5.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Riok.Mapperly --version 3.5.1
#r "nuget: Riok.Mapperly, 3.5.1"
#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.
// Install Riok.Mapperly as a Cake Addin
#addin nuget:?package=Riok.Mapperly&version=3.5.1

// Install Riok.Mapperly as a Cake Tool
#tool nuget:?package=Riok.Mapperly&version=3.5.1

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.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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Riok.Mapperly:

Package Downloads
Fanzoo.Kernel The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

An opinionated framework for building scalable web applications.

Indice.Hive.Core

Package Description

Eternet.AspNetCore.DocumentDb.Crud The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

AspNet Core DocumentDb CRUD framework using Marten for Document DB and Events Store

BeamOS.Common.Api

Package Description

BeamOS.PhysicalModel.Application

Package Description

GitHub repositories (7)

Showing the top 5 popular GitHub repositories that depend on Riok.Mapperly:

Repository Stars
riok/mapperly
A .NET source generator for generating object mappings. No runtime reflection.
martinothamar/Mediator
A high performance implementation of Mediator pattern in .NET using source generators.
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
velopack/velopack
Installer and automatic update framework for cross-platform desktop applications
PlexRipper/PlexRipper
The best cross-platform Plex media downloader there is! In active development and feedback is very welcome!
Version Downloads Last updated
3.5.1 1,295 4/23/2024
3.5.1-next.2 221 4/15/2024
3.5.1-next.1 166 4/9/2024
3.5.0 32,407 4/5/2024
3.5.0-next.4 579 3/27/2024
3.5.0-next.3 953 3/18/2024
3.5.0-next.2 1,403 3/11/2024
3.5.0-next.1 349 3/9/2024
3.4.0 138,104 2/23/2024
3.4.0-next.5 631 2/20/2024
3.4.0-next.4 833 2/16/2024
3.4.0-next.3 2,677 2/5/2024
3.4.0-next.2 9,054 1/10/2024
3.4.0-next.1 288 1/6/2024
3.3.1-next.1 2,535 12/18/2023
3.3.0 326,683 12/12/2023
3.3.0-next.6 789 12/6/2023
3.3.0-next.5 1,263 11/28/2023
3.3.0-next.4 1,294 11/22/2023
3.3.0-next.3 2,914 11/19/2023
3.3.0-next.2 2,509 10/26/2023
3.3.0-next.1 2,790 10/11/2023
3.2.0 421,585 9/18/2023
3.2.0-next.4 1,360 9/12/2023
3.2.0-next.3 438 9/11/2023
3.2.0-next.2 260 9/5/2023
3.2.0-next.1 449 8/29/2023
3.1.0 125,475 8/18/2023
3.1.0-next.2 91 8/18/2023
3.1.0-next.1 4,132 8/8/2023
3.0.0 30,782 8/7/2023
3.0.0-next.1 275 8/2/2023
2.9.0-next.4 4,607 7/26/2023
2.9.0-next.3 537 7/16/2023
2.9.0-next.2 4,952 6/13/2023
2.9.0-next.1 5,517 5/11/2023
2.8.0 448,703 4/27/2023
2.8.0-next.2 502 4/20/2023
2.8.0-next.1 14,423 3/23/2023
2.7.1-next.1 641 3/17/2023
2.7.0 130,791 3/13/2023
2.7.0-next.2 759 1/26/2023
2.7.0-next.1 591 1/23/2023
2.6.0 72,535 1/12/2023
2.6.0-next.4 100 1/11/2023
2.6.0-next.3 153 1/9/2023
2.6.0-next.2 279 12/14/2022
2.6.0-next.1 557 12/12/2022
2.5.0 73,261 10/12/2022
2.5.0-next.2 307 9/28/2022
2.5.0-next.1 202 9/19/2022
2.4.1-next.1 173 9/16/2022
2.4.0 14,885 9/8/2022
2.3.3 3,033 8/10/2022
2.3.2 862 8/9/2022
2.3.1 61,185 5/31/2022
2.3.0 2,363 5/16/2022
2.2.1 3,489 4/6/2022
2.2.0 1,195 3/15/2022
2.1.0 1,026 2/28/2022
2.0.0 922 2/21/2022

## [3.5.1](https://github.com/riok/mapperly/compare/v3.5.0...v3.5.1) (2024-04-23)


### Bug Fixes

* Add missing generic constraints to generated methods ([#1227](https://github.com/riok/mapperly/issues/1227)) ([5324612](https://github.com/riok/mapperly/commit/53246129cc56551b4ecfb885eefdb83f176ed710))
* Do not discover mapping methods marked as [ObjectFactory] automatically ([#1234](https://github.com/riok/mapperly/issues/1234)) ([1cd6814](https://github.com/riok/mapperly/commit/1cd6814c969fea77ba2537c8e2ba6f10f514e667))
* expand target type new when inlining in queryable projection mappings ([#1238](https://github.com/riok/mapperly/issues/1238)) ([840b6e1](https://github.com/riok/mapperly/commit/840b6e17555a944912ba332711dbce2d5b66395f))
* extend queryable project inlined arguments with full namespace ([#1233](https://github.com/riok/mapperly/issues/1233)) ([de3b332](https://github.com/riok/mapperly/commit/de3b332fed69762d0f6a64fc288823fe52898df9))
* respect user mapping attributes in generic mappings ([#1230](https://github.com/riok/mapperly/issues/1230)) ([f753ceb](https://github.com/riok/mapperly/commit/f753ceb5a7c32e9306300770359a185c354b031a))
* use correct nullable types when referencing named mappings ([#1237](https://github.com/riok/mapperly/issues/1237)) ([b3f79e8](https://github.com/riok/mapperly/commit/b3f79e814c38b726ec45a4c0e402dc76b0d2910e))