JP
unread,Mar 2, 2012, 10:23:06 AM3/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AutoMapper-users
Hi,
In my mappings, I'm using
Mapper.CreateMap<TSource, TDestination>()
.ForAllMembers(opt => opt.Condition(src => !
src.IsSourceValueNull));
in order to ignore null values. This worked fine in AutoMapper version
2.0.0.32.
However, something seems to have changed in 2.1. When I break on the
src => !src.IsSourceValueNull expression, I can see that the src
properties are null, which makes IsSourceValueNull == true. The
TSource object that is being mapped does have correct values, so there
seems to be a problem with this.
When I delete the .ForAllMembers clause altogether, the mapping does
happen correctly.
Any idea as to why this seems to have changed? Did something break, or
is a different approach required? Thanks for any info.