mapperly
mapperly copied to clipboard
Docs: explain how mapperly reuses user defined mappers
Is your feature request related to a problem? Please describe. Docs don't mention how mapperly reuses user defined mappers. Could be its own section or added to User implemented mapping methods
[Mapper(EnumMappingStrategy = EnumMappingStrategy.ByName)]
public static partial class CarMapper
{
[MapProperty(nameof(Car.Manufacturer), nameof(CarDto.Producer))] // Map property with a different name in the target type
public static partial CarDto MapCarToDto(Car car);
[MapperIgnoreSource("Make")]
[MapperIgnoreTarget("Make")]
private static partial TireDto MyMapToTireDto(Tire source);
}
Also improve the documentation on which user defined or user implemented mapping is used by Mapperly (always the first one that matches the given types). Rel. https://github.com/riok/mapperly/discussions/1007#discussion-5963848