You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Automapper 4.2.1 mapping from an Interface to a concrete class worked so that if a null property defined as an Interface would map to a concrete class as null.
In Automapper 5.0.2 a null interface property maps to a default constructed concrete class.
This is a breaking issue for my application. I have a lot of interface properties on source classes mapping to concrete class properties in the destination class.
Expectation:
I would expect that null properties on the source would map to null properties on the destination.
In Automapper 4.2.1 mapping from an Interface to a concrete class worked so that if a
null
property defined as an Interface would map to a concrete class asnull
.In Automapper 5.0.2 a null interface property maps to a default constructed concrete class.
This is a breaking issue for my application. I have a lot of interface properties on source classes mapping to concrete class properties in the destination class.
Expectation:
I would expect that null properties on the source would map to null properties on the destination.
To test:
Gist
Although test is a console app, issue also occurs in a UWP app.
4.2.1 output:
5.0.2 output:
The text was updated successfully, but these errors were encountered: