Automapper returns reference to the same object when mapping sequences to arrays

前端 未结 1 1541
滥情空心
滥情空心 2021-01-14 04:03

I have an extension method for IEnumerable, which maps sequence items and returns an array of clones:

public static class AutoMapperExt         


        
相关标签:
1条回答
  • 2021-01-14 04:15

    So this isn't a bug - when AutoMapper sees two objects that are assignable, it will simply assign them. If you want to override that behavior, create a map between the two collection types.

    0 讨论(0)
提交回复
热议问题