Closed sharpcoder7 closed 7 years ago
Automapper raises an exception if collection type was not a List due calling Add method using reflection. This was because we explicitly set baseListType as List<> but if instance is not null it may not be a List<>.
Add
baseListType
List<>
instance
@sharpcoder7 Had this same issue today, your PR did the trick :) Thanks a lot!
Automapper raises an exception if collection type was not a List due calling
Add
method using reflection. This was because we explicitly setbaseListType
asList<>
but ifinstance
is not null it may not be aList<>
.