Automapper sets an array property to a zero-length array rather than null

后端 未结 2 1485
眼角桃花
眼角桃花 2021-01-17 07:37

I\'m using Automapper to copy values from one instance to another, and I\'m finding that if the class has an array property, and the source instance has the property set to

2条回答
  •  悲哀的现实
    2021-01-17 08:11

    I think this is just a quirk from using the exact same type for both source and destination. If you actually make them different types, the byte array comes through as null.

提交回复
热议问题