How can I get AutoMapper to keep null from the source?
new MapperConfiguration(cfg => cfg.CreateMap<MyModel, MyModel>()
.ForMember(m => m.prop1, opt => opt.AllowNull())
.ForMember(m => m.prop1, opt => opt.NullSubstitute(null))
.ForMember(m => m.prop1, opt => opt.MapFrom(s => s.prop1))
).CreateMapper();
prop1 is a nullable, e.g. string[]
I always get the default for the type.