Replies: 1 comment
-
Multiple matches are a terrible way to use AM :) So, really, just rename stuff. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Prior to AutoMapper 11 it was possible to map from a method in the source class to a property on the destination if it followed naming conventions. In the following example
Destination.Name
would get the value fromSource.GetName()
.This mapping from methods also seemed to take precedence over properties. In if there was a property that would be mapped and also a matching method, the method would be used over the property. In the following example
Destination.Name
would still get the value fromSource.GetName()
even though there is aSource.Name
property.This behaviour seems to have been removed from AutoMapper 11. I'm not sure what this feature is called but I cannot see any obvious reference to it on the upgrade guide (https://docs.automapper.org/en/latest/11.0-Upgrade-Guide.html). Is there a way to re-enable it in AutoMapper 11?
Beta Was this translation helpful? Give feedback.
All reactions