0

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);
FDM
  • 628
  • 6
  • 18

1 Answers1

0

You need to use IgnoreNullValues