Replies: 1 comment
-
If you have a conversion operator in your class, AM could use that. |
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.
-
We've got long standing code that effectively wraps a property with something like nullable, but not actually nullable. I'd like to take the mapping from one type that contains properties of say
SomeType<T>
and register a generic conversion/mapping that will automatically just grab.Value
and return T so that theoreticallycould be mapped to:
It looks like automapper supports mapping open generics, but tends to map from one Generic type to a different generic type, not a generic wrapper for the underlying type (unless I'm missing something).
I also realize I could just register each type like
SomeType<bool>
tobool
, but I'm hoping to avoid all these manual registrations for every type, since the conversion really shouldnt be different.Beta Was this translation helpful? Give feedback.
All reactions