Core Concepts — Attributes, Converters & Polymorphic Mapping
EricksonLopez.Mapper drives deterministic C# emission strictly from declarative attributes on partial mapper types.
[Mapper(StrictMapping = true)]: Enables source generation;StrictMappingdefaults totrue.[MapProperty(sourceName, destinationName)]: Maps renamed properties explicitly.[MapIgnore(destinationName)]/[MapIgnoreSource(sourceName)]/[MapperIgnore]: Excludes unmapped targets or sources cleanly without trippingELM001.[MapValue(destinationName, valueExpression)]&[MapNullFallback(destinationName, fallbackExpression)]: Supplies constant defaults or null fallbacks.[EnumMappingStrategy(...)]&[MapEnumValue(source, target)]: Controls enum mapping strategy and explicit case remapping.[MapFactory(methodName)]: Delegates object construction to a custom factory method (ELM017if unresolved).[MapDerivedType(sourceType, targetType)]: Emits polymorphic type-switch dispatch (ELM010detects cycles across derived types inv2.0.0).[UseConverter(type | fieldName)]: Applies customIConverter<TSource, TDestination>converters.
Nullable Collections & DateOnly Rules (v2.0.0)
Section titled “Nullable Collections & DateOnly Rules (v2.0.0)”In v2.0.0, nullable destination collections initialize to null when source is null instead of silently allocating empty collections, and DateOnly → DateTimeOffset conversions force DateTimeKind.Utc.