Created
March 21, 2018 14:19
-
-
Save mdcarmo/c8e5d9cfedffffeac71d6cbe7ec121f5 to your computer and use it in GitHub Desktop.
exemplo de mapeamento de classes com o Automapper
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
public class AutoMapperProfile: Profile | |
{ | |
public AutoMapperProfile() | |
{ | |
CreateMap<User, UserDto>(); | |
CreateMap<UserDto, User>(); | |
CreateMap<Post, PostDto>(); | |
CreateMap<PostDto, Post>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment