Created
April 12, 2010 16:28
-
-
Save detroitpro/363750 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public static void RunSnippet() | |
| { | |
| Mapper.CreateMap<FirstClass,SecondClass>(); | |
| Mapper.CreateMap<FirstEnum,SecondEnum>(); | |
| var firstClass = new FirstClass(); | |
| firstClass.EnumValue = FirstEnum.NamedEnum; | |
| Mapper.Map<FirstClass,SecondClass>(firstClass); | |
| } | |
| public class FirstClass | |
| { | |
| FirstEnum EnumValue {get;set;} | |
| } | |
| public enum FirstEnum | |
| { | |
| NamedEnum = 1, | |
| SecondNameEnum = 2 | |
| } | |
| public class SecondClass | |
| { | |
| SecondEnum EnumValue {get;set;} | |
| } | |
| public enum SecondEnum | |
| { | |
| DifferentNamedEnum = 1, | |
| SecondNameEnum = 2 | |
| } | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The expected output is that
SecondClass.EnumValue = SecondEnum.DifferentNamedEnum;