Automapper can ignore assignments if it is not null / only change null fields

Reference Information. I am working on a web service that I want to allow input that has a null field meaning "do not update." The input object is very similar, but not identical to the database model, so we use automapper to perform the transformations.

Therefore, in the case of an update, I would like to use the existing values, use them to override any of the null input fields, and then save this for the entire update. So, is there a way to force automapper to only put values ​​in the destination if the destination field is null?

+5
source share
1 answer

, , , , . , ( , 100% , ).

+2