Created
February 13, 2014 12:39
-
-
Save kkdai/8974398 to your computer and use it in GitHub Desktop.
Try to converse it back to delegate or .Net 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mapper.CreateMap<DTOObject, MainObject>().ForMember( | |
d => d.TopObject, | |
mc => mc.MapFrom(s => new SubObject(){ | |
SubPropText = s.TopText, | |
SubPropFont = s.TopFont | |
} | |
)); | |
//--> | |
Mapper.CreateMap<DTOObject, MainObject>().ForMember( | |
d => d.TopObject, // 每一個d 回傳 d.TopObject | |
mc => mc.MapFrom( // 每一個mc 回傳 mc.MapFrom | |
s => new SubObject(){ //用 | |
SubPropText = s.TopText, | |
SubPropFont = s.TopFont | |
} | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment