This will work both for mapping to a new or to an existing object.
Mapper.CreateMap<FatherModel, Father>()
.ForMember(x => x.Son, opt => opt.MapFrom(model => model));
Mapper.CreateMap<FatherModel, Son>()
.ForMember(x => x.Id, opt => opt.MapFrom(model => model.SonId));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…