Created
June 20, 2011 19:53
-
-
Save darrencauthon/1036421 to your computer and use it in GitHub Desktop.
AutoMapperAssist example
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
private class ProductViewMapper : Mapper<Product, ProductView> | |
{ | |
public override void DefineMap(IConfiguration configuration) | |
{ | |
configuration.CreateMap<Product, ProductView>() | |
.ForMember(dest => dest.Name, opt => opt.MapFrom(orig => orig.Name + "WHOOPS")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right, I've used automapper on another project, but found the assist in nuget. Thanks a bunch!