Skip to content

Instantly share code, notes, and snippets.

@darrencauthon
Created June 20, 2011 19:53
Show Gist options
  • Save darrencauthon/1036421 to your computer and use it in GitHub Desktop.
Save darrencauthon/1036421 to your computer and use it in GitHub Desktop.
AutoMapperAssist example
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"));
}
}
@JasonMore
Copy link

Right, I've used automapper on another project, but found the assist in nuget. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment