Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Create multiple maps of same type based off parameter [FeatureRequest] #277

Closed
CJM3407 opened this Issue Dec 7, 2012 · 1 comment

Comments

Projects
None yet
2 participants

CJM3407 commented Dec 7, 2012

Is there a way to call CreateMap on multiple times on the same mapping, but make it choose the correct mapping definition based on a parameter. For example, I am mapping ObjectA to ObjectB. I want to set a property on ObjectB to the string concatenation of two properties on ObjectA. But I also in a different part of code want map ObjectA to ObjectB where the same property is only based on one of ObjectA's properties.

This question stems from a feature in Unity (dependency injection library). It allows you to name your registration with a string. And maybe this feature exists in AutoMapper, and I am not looking in the correct location.

Owner

jbogard commented Jan 30, 2013

Named profiles in DI containers are more or less a bad idea. I want to go a different direction here, but not in the form of strings.

@jbogard jbogard removed this from the v.Future milestone Jan 18, 2016

@jbogard jbogard closed this Jan 18, 2016

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