Can I register a conversion between SomeType<T> and T #3981
-
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 public class BookInput{
public SomeType<bool> IsFavorite{get;set;}
} could be mapped to: public class Book{
public bool IsFavorite{get;set;}
} 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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you have a conversion operator in your class, AM could use that. |
Beta Was this translation helpful? Give feedback.
If you have a conversion operator in your class, AM could use that.