Skip to content

Exception Due To Replacing ForAllOtherMembers With MemberList.None #4036

Locked Answered by jbogard
jwbats asked this question in Q&A
Discussion options

You must be logged in to vote

.ForAllOtherMembers(opt => opt.Ignore()) is not equivalent to MemberList.None exactly. It does not cover the case where members actually map.

I'm not sure I'd use AutoMapper for this case, I have yet to see a case for the above where manual code wasn't more obvious. If you have to ignore every mapping except for what is explicitly mapped, you don't have AutoMapper you have ManualMapper. That method was removed because it was so confusing about what the expected behavior should be. I regret ever adding it in the first place.

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by lbargaoanu
Comment options

You must be logged in to vote
2 replies
@jbogard
Comment options

@jwbats
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jbogard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #4035 on August 07, 2022 13:19.