I\'m trying to use AutoMapper to map from DTO\'s to my Domain.
My DTO\'s might look like this:
public class MyDTO
{
public string Name { get; set
The answer:
Some remarks:
If your persistence layer is simple, using UseDestinationValue() will tell AutoMapper to not replace the underlying collection:
ForMember(dest => dest.Children, opt => opt.UseDestinationValue())
However, if it's not simple, we just do the updating manually back into the domain. The logic generally gets more complex to update the domain model. Doing reverse mapping puts constraints on the shape of your domain model, which you might not want.