This is about Automapper 9. Let's say you have two classes like
public class Entity {
public byte[] RowVersion { get; set;
}
public class Model {
public byte[] RowVersion { get; set;
}
// mapping
CrateMap<Entity, Model>().ReverseMap();
When mapping, AutoMapper would simply copy array's reference to target. Which works for me, but only when projection is in direction from Entity to Model. When mapping Model back to Entity, I'd like to copy the array by value instead. Using a type converter won't work since it has collateral effects as it is a global converter. A value converter won't work either, since you can't access the target property, but just return a (new) instance of byte array. Ideally I would use a type converter on a CreateMap (without ReverseMap) but I doubt that's possible.
So I'm a bit stuck on how to do it properly.