Ignoring properties that are nullable in the source but not nullable in the target #3941
-
Hello guys, AutoMapper Version : 10.1.1 I try to ignore null properties on source, I read a lot of things but I stuck in a point. I want to do this for all props. I use ForAllMembers and Condition. My Code:
This doesn't work when target is not nullable, srcMember gets default value of target type, For Example, source prop type int? , target prop type int, srcMember is not null, is 0. How I can fix this problem ? I'm not sure if this is a bug. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello guys, I think authors won't help me. I solved my problem like this way, I hope this can help you.
|
Beta Was this translation helpful? Give feedback.
Hello guys, I think authors won't help me. I solved my problem like this way, I hope this can help you.