Convert nullable type to class #4222
-
I have a very simple class, wrapping a double and providing me a custom ToString():
With Automapper (version 10.1.1) I try to map a My first try was the 'plain' way:
I do understand that this does not work, because when I check the execution plan, it clearly shows the null check done by AutoMapper. So, my next try was a custom TypeConverter:
This solution does not work either. Checking the execution plan tells me that the Am I doing something wrong here? Or is there an easier way to implement the AutoMapping? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
mapper.Map<double?, Age>(value)
.