Riok.Mapperly
2.9.0-next.2
Prefix Reserved
See the version list below for details.
dotnet add package Riok.Mapperly --version 2.9.0-next.2
NuGet\Install-Package Riok.Mapperly -Version 2.9.0-next.2
<PackageReference Include="Riok.Mapperly" Version="2.9.0-next.2" />
paket add Riok.Mapperly --version 2.9.0-next.2
#r "nuget: Riok.Mapperly, 2.9.0-next.2"
// Install Riok.Mapperly as a Cake Addin #addin nuget:?package=Riok.Mapperly&version=2.9.0-next.2&prerelease // Install Riok.Mapperly as a Cake Tool #tool nuget:?package=Riok.Mapperly&version=2.9.0-next.2&prerelease
Mapperly
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.
Product | Versions 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (16)
Showing the top 5 NuGet packages that depend on Riok.Mapperly:
Package | Downloads |
---|---|
Rocket.Surgery.LaunchPad.Mapping
Package Description |
|
Indice.Hive.Core
Package Description |
|
Fanzoo.Kernel
An opinionated framework for building scalable web applications. |
|
Eternet.AspNetCore.DocumentDb.Crud
AspNet Core DocumentDb CRUD framework using Marten for Document DB and Events Store |
|
BeamOS.Tests.Common
Package Description |
GitHub repositories (16)
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 ❤️
|
|
neozhu/CleanArchitectureWithBlazorServer
This is a repository for creating a Blazor Server dashboard application following the principles of Clean Architecture
|
|
mehdihadeli/food-delivery-microservices
🍔 A practical and imaginary food delivery microservices, built with .Net 8, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
Version | Downloads | Last updated |
---|---|---|
4.1.1 | 20,265 | 11/20/2024 |
4.1.1-next.0 | 1,121 | 11/5/2024 |
4.1.0 | 84,538 | 10/31/2024 |
4.1.0-next.3 | 116 | 10/29/2024 |
4.1.0-next.2 | 619 | 10/25/2024 |
4.1.0-next.1 | 593 | 10/14/2024 |
4.1.0-next.0 | 645 | 10/11/2024 |
4.0.0 | 95,411 | 10/11/2024 |
4.0.0-next.4 | 1,598 | 9/29/2024 |
4.0.0-next.3 | 11,681 | 8/13/2024 |
4.0.0-next.2 | 482 | 8/6/2024 |
4.0.0-next.1 | 3,182 | 6/30/2024 |
3.6.0 | 845,239 | 6/18/2024 |
3.6.0-next.2 | 1,669 | 6/3/2024 |
3.6.0-next.1 | 4,697 | 5/3/2024 |
3.5.1 | 402,811 | 4/23/2024 |
3.5.1-next.2 | 1,344 | 4/15/2024 |
3.5.1-next.1 | 229 | 4/9/2024 |
3.5.0 | 234,992 | 4/5/2024 |
3.5.0-next.4 | 1,113 | 3/27/2024 |
3.5.0-next.3 | 8,933 | 3/18/2024 |
3.5.0-next.2 | 14,323 | 3/11/2024 |
3.5.0-next.1 | 630 | 3/9/2024 |
3.4.0 | 362,309 | 2/23/2024 |
3.4.0-next.5 | 1,595 | 2/20/2024 |
3.4.0-next.4 | 884 | 2/16/2024 |
3.4.0-next.3 | 4,017 | 2/5/2024 |
3.4.0-next.2 | 18,444 | 1/10/2024 |
3.4.0-next.1 | 330 | 1/6/2024 |
3.3.1-next.1 | 2,839 | 12/18/2023 |
3.3.0 | 548,151 | 12/12/2023 |
3.3.0-next.6 | 1,018 | 12/6/2023 |
3.3.0-next.5 | 1,372 | 11/28/2023 |
3.3.0-next.4 | 2,329 | 11/22/2023 |
3.3.0-next.3 | 7,237 | 11/19/2023 |
3.3.0-next.2 | 3,387 | 10/26/2023 |
3.3.0-next.1 | 3,679 | 10/11/2023 |
3.2.0 | 630,284 | 9/18/2023 |
3.2.0-next.4 | 1,394 | 9/12/2023 |
3.2.0-next.3 | 463 | 9/11/2023 |
3.2.0-next.2 | 330 | 9/5/2023 |
3.2.0-next.1 | 482 | 8/29/2023 |
3.1.0 | 149,361 | 8/18/2023 |
3.1.0-next.2 | 112 | 8/18/2023 |
3.1.0-next.1 | 4,524 | 8/8/2023 |
3.0.0 | 39,869 | 8/7/2023 |
3.0.0-next.1 | 355 | 8/2/2023 |
2.9.0-next.4 | 6,614 | 7/26/2023 |
2.9.0-next.3 | 709 | 7/16/2023 |
2.9.0-next.2 | 5,064 | 6/13/2023 |
2.9.0-next.1 | 5,565 | 5/11/2023 |
2.8.0 | 539,321 | 4/27/2023 |
2.8.0-next.2 | 523 | 4/20/2023 |
2.8.0-next.1 | 17,224 | 3/23/2023 |
2.7.1-next.1 | 664 | 3/17/2023 |
2.7.0 | 169,699 | 3/13/2023 |
2.7.0-next.2 | 831 | 1/26/2023 |
2.7.0-next.1 | 614 | 1/23/2023 |
2.6.0 | 90,569 | 1/12/2023 |
2.6.0-next.4 | 115 | 1/11/2023 |
2.6.0-next.3 | 173 | 1/9/2023 |
2.6.0-next.2 | 295 | 12/14/2022 |
2.6.0-next.1 | 572 | 12/12/2022 |
2.5.0 | 83,030 | 10/12/2022 |
2.5.0-next.2 | 336 | 9/28/2022 |
2.5.0-next.1 | 237 | 9/19/2022 |
2.4.1-next.1 | 207 | 9/16/2022 |
2.4.0 | 18,782 | 9/8/2022 |
2.3.3 | 3,089 | 8/10/2022 |
2.3.2 | 916 | 8/9/2022 |
2.3.1 | 61,571 | 5/31/2022 |
2.3.0 | 2,417 | 5/16/2022 |
2.2.1 | 3,537 | 4/6/2022 |
2.2.0 | 1,258 | 3/15/2022 |
2.1.0 | 1,071 | 2/28/2022 |
2.0.0 | 1,156 | 2/21/2022 |
# [2.9.0-next.2](https://github.com/riok/mapperly/compare/v2.9.0-next.1...v2.9.0-next.2) (2023-06-13)
### Bug Fixes
* clone array when deepcloning is enabled and target is an IEnumerable ([#431](https://github.com/riok/mapperly/issues/431)) ([082d877](https://github.com/riok/mapperly/commit/082d877e113378ec8d29b6928911ff4c398fe762))
* existing dictionary and enumerable mapping should respect enabled conversion types ([#459](https://github.com/riok/mapperly/issues/459)) ([86f48a2](https://github.com/riok/mapperly/commit/86f48a2a152e637f46e188c4ee11f7d369f23230))
* ignore user implemented generic methods ([#423](https://github.com/riok/mapperly/issues/423)) ([408d03f](https://github.com/riok/mapperly/commit/408d03fdc13a19ef254faa253e7745b452524068))
* only use instance constructors to create new object instances ([#458](https://github.com/riok/mapperly/issues/458)) ([848fb45](https://github.com/riok/mapperly/commit/848fb45c5d81ca868b2818a2496738eda57a1d25))
* prevent ctormapping using inaccessible constructors ([#456](https://github.com/riok/mapperly/issues/456)) ([125742e](https://github.com/riok/mapperly/commit/125742e799fb4ed166750ddc955750f5ab50f0cd))
* use ToList/ToArray to clone enumerable interfaces ([#432](https://github.com/riok/mapperly/issues/432)) ([f947cbf](https://github.com/riok/mapperly/commit/f947cbf868cc4a9ccdd7be2e4d55027229d2d3d7))
### Features
* add support for user defined generic mapping methods ([#461](https://github.com/riok/mapperly/issues/461)) ([ddbc516](https://github.com/riok/mapperly/commit/ddbc5169a3afe4d290c58b5e05c6e4b749a6f30d))
* Added MapEnumValueAttribute and support for explicit named enum value mapping ([#468](https://github.com/riok/mapperly/issues/468)) ([64e6c9d](https://github.com/riok/mapperly/commit/64e6c9d58862ea6beb88d11488a824cd5425220e))
* added source generator benchmark ([#419](https://github.com/riok/mapperly/issues/419)) ([b6836b2](https://github.com/riok/mapperly/commit/b6836b277e23a0028f6a762880be2c9efe4bff20))
* cache attribute symbols ([#478](https://github.com/riok/mapperly/issues/478)) ([fbe8ba1](https://github.com/riok/mapperly/commit/fbe8ba154efa5cd727affa5280bdc24dfd62a6aa))
* directly assign System.Uri and System.Version when deep cloning ([#440](https://github.com/riok/mapperly/issues/440)) ([c845b43](https://github.com/riok/mapperly/commit/c845b43bea2651b9e67b1bc7dae99c5320da60b1))
* explicit enum mappings for byValue enum mappings ([#489](https://github.com/riok/mapperly/issues/489)) ([029dae2](https://github.com/riok/mapperly/commit/029dae28de90722f0bf55f7aabed47027db5ed83))
* optimize BuildMemberPathCandidates performance ([#480](https://github.com/riok/mapperly/issues/480)) ([34b926b](https://github.com/riok/mapperly/commit/34b926b456b74a7c3c36c11be29c271547ddba6f))
* Support enum mapping is defined check and fallback values ([#491](https://github.com/riok/mapperly/issues/491)) ([f0065c8](https://github.com/riok/mapperly/commit/f0065c8c5e9fa4b3a26951e733c0d06bb5501816))