'Replacement for Automapper's ForAllOtherMembers() - scenario 2
ForAllOtherMembers extension method was removed from Automapper 11. We have used it to set a conditional mappings for properties other than the one mentioned before like this:
cfg.CreateMap<TSource, TDest>()
.ForMember(d => d.Interval, opt => opt.Condition((src, dest, value) => value != default))
.ForAllOtherMembers(opt => opt.Condition((src, dest, value) => value != null));
How to do this in Automapper 11 ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
