I have an object representing an update:
var update = new ExpandoObject();
update.AddSafely("Name", "Mary");
This property is part of a dto, like:
public class Dto
{
public string Name {get; set;}
public string Other {get; set;
}
var data = new Dto { Name = "John", Other = "SomeData" };
Now when I map, all (other) properties not in the source dictionary are set to their default.
// Name = "Mary" but Other = null
update.Adapt(data);
You need to use IgnoreNullValues