Replies: 1 comment 2 replies
-
I think this is better suited for StackOverflow. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Source/destination types
Mapping configuration
For reference, configuration working as expected:
Version: 12.0.1-alpha.0.2, 12.0.0, 11.0.1
Expected behavior
When mapping elements from a source collection to a target collection, the target collection should contain any elements returned in the MapFrom.
Actual behavior
Target collections becomes null or empty if the same instance is returned by the resolver. Works as expected if a shallow copy is returned instead.
Steps to reproduce
Complete NUnit test below. Test1 fails, Test2 passes, difference being a .ToList() in Test2's MapFrom.
Edit: Capacity of the resulting target collection is correct (4) in Test1 below. Maybe the target is being cleared before being assigned the new value.
Beta Was this translation helpful? Give feedback.
All reactions