Bug with ForAllOtherMembers

43 views
Skip to first unread message

cjm.ai...@gmail.com

unread,
Jun 15, 2017, 7:42:21 PM6/15/17
to AutoMapper-users
If you do something like this,

var config = new AutoMapper.MapperConfiguration(cfge =>
            {

                cfge.CreateMap<ASrc, ADst>()
                    .ForMember(d => d.a1, ops => ...);

                cfge.CreateMap<BSrc, BDst>()
                    .IncludeBase<ASrc, ADst>()
                    .ForMember(d => d.b1, ops => { })
                    .ForAllOtherMembers(ops => /* THIS WILL BE CALLED FOR a1 */);
            });

the base class' members will still be included in the derived class' ForAllOtherMembers, even though they were already configured in the base class map.

I don't think it should be like that.

Jimmy Bogard

unread,
Jun 16, 2017, 5:39:54 AM6/16/17
to automapper-users
Can you open a GH issue?

--
You received this message because you are subscribed to the Google Groups "AutoMapper-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automapper-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cjm.ai...@gmail.com

unread,
Jul 26, 2017, 3:34:37 PM7/26/17
to AutoMapper-users
I don't know how to do that.

To unsubscribe from this group and stop receiving emails from it, send an email to automapper-use...@googlegroups.com.

Jimmy Bogard

unread,
Jul 26, 2017, 4:02:53 PM7/26/17
to automapp...@googlegroups.com
How to create a GitHub issue?

CJM Airstrip

unread,
Jul 26, 2017, 4:09:43 PM7/26/17
to automapp...@googlegroups.com
Right

To unsubscribe from this group and stop receiving emails from it, send an email to automapper-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "AutoMapper-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automapper-users/lko9N_Y1NgU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automapper-users+unsubscribe@googlegroups.com.

Jimmy Bogard

unread,
Jul 26, 2017, 4:45:28 PM7/26/17
to automapper-users
Reply all
Reply to author
Forward
0 new messages