I am trying to copy source value only if the destination value is null. I am using the following map
Mapper.CreateMap<BM.AudioSetting, BM.AudioSetting>()
.ForMember(dest => dest.MSOffsetInherited, opt =>
{
opt.Condition(src => src.DestinationValue == null);
opt.MapFrom(src => src.MSOffset);
});
In my condition I am checking to make sure the destination value is null before mapping. The problem is the copying is happening all the time regardless of the destination value.
Am I doing this wrong?
Thanks Isam