We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An example would be appreciated. The examples here are for mapping/custom mapping to a single entity. Thanks.
The text was updated successfully, but these errors were encountered:
You can do that a couple of ways:
public class MyModel : IMapFrom<Entity1>, IMapFrom<Entity2> { }
Or, you can do it by implementing IHaveCustomMappings:
public class MyModel : IHaveCustomMappings { public void CreateMappings(IMapperConfigurationExpression configuration) { configuration.CreateMap<Entity1, MyModel>() .ForMember(x => x.Name, opt => opt.MapFrom(x => x.FullName)); configuration.CreateMap<Entity2, MyModel>() .ForMember(x => x.Name, opt => opt.MapFrom(x => x.FullName)); } }
Sorry, something went wrong.
No branches or pull requests
An example would be appreciated. The examples here are for mapping/custom mapping to a single entity. Thanks.
The text was updated successfully, but these errors were encountered: