How do you map a Dto to an existing object instance with nested objects using AutoMapper?
问题 I have the following Dto and entity with a nested sub entity. public class Dto { public string Property { get; set; } public string SubProperty { get; set; } } public class Entity { public string Property { get; set; } public SubEntity Sub { get; set; } } public class SubEntity { public string SubProperty { get; set; } } How can I set up a mapping with AutoMapper that will allow me to update an existing instance of Entity with the values from a Dto . I'm using Mapper.Map(dto, entity) to