Nullable to not-nullable mapping #1514
-
Dear all, I have a question regarding the mapping of nullable types, that seems not available from reading the documentation on the topic: class A {
TimeSpan? duration;
}
class B {
TimeSpan duration;
} As much as i can see, I can configure to assign the null when mapping A to B, or to throw during runtime; or i can configure my intended handling to return TimeSpan.Zero. But is there a way that i will get a compile time error for such cases; because in general I want to decide what should happen for such mappings. This especially the case as the DTO often is modelled with nullable types to allow for flexibility. Many thanks for the great product! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for bringing this up, I think it is a duplicate of #602. |
Beta Was this translation helpful? Give feedback.
Thanks for bringing this up, I think it is a duplicate of #602.