10.0 Upgrade Guide
All collections are mapped by default, even if they have no setter
You’ll have to explicitly ignore those you don’t want mapped. See also this.
Matching constructor parameters will be mapped from the source, even if they are optional
You can always rename things or use an explicit MapFrom
.
Context.Mapper.Map
overloads that receive a context were removed
Not needed, because the context is passed by default, so you can change the context instance you already have.
UseDestinationValue
is now inherited by default
You can override that with DoNotUseDestinationValue
.
AllowNull
allows you to override per member AllowNullDestinationValues
and AllowNullCollections
This used to be ignored for Map
. Now it’s consistent with ProjectTo
.
The ResolutionContext
no longer has a public constructor
You can test the entire Map
operation.
Mapping from dynamic
in .NET 4.6.1
Due to a refactoring of IMapper
, you might need to add a cast to object
when mapping from dynamic
.
Source validation
Only simple source members expressions are considered, MapFrom(d => d.Member, s => s.SourceMember)
.
MaxDepth
When reaching MaxDepth
, destination collections are null/empty, they used to contain null
values.
String based MapFrom
-s are reversed now, also applies to attribute mapping
You can always not use it and explicitly create the reverse map. Or ignore the reversed member.
ReverseMap
will also reverse the naming conventions
You can always not use it and explicitly create the reverse map.