I'm using automapper 13.0.1 to map one object to another:
CreateMap<CandidateInfoContactDataSendEvent, TechUser>()
.ForMember(dest => dest.PhoneNumber, opt => opt.MapFrom(src => src.NewPhoneNumber))
.ForMember(dest => dest.EmailHash, opt => opt.MapFrom<TechUserEmailHashResolver>())
.ForMember(dest => dest.BirthDate, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.AdditionalPhoneNumber, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.FirstName, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.LastName, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.FatherName, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.Gender, opt => opt.Condition((src, dest) => dest.DestroyDate == null))
.ForMember(dest => dest.Email, opt => opt.Condition((src, dest) => dest.DestroyDate == null));
As you can see some properties maps with the same condition. And I want to combine this conditions in one. I cant not use ForAllMembers for PhoneNumber and EmailHash because they do not depend on DestroyDate. But I need something like ForAllMembers.I need ForAllMembers condition except PhoneNumber and EmailHash.
Thanks for help
ForAllMembers, so you can filter for that.