Mapping Inheritance - Is the order of the mapping important?

11 views
Skip to first unread message

cjm.ai...@gmail.com

unread,
Jun 1, 2017, 12:16:15 PM6/1/17
to AutoMapper-users
When setting up a configuration, can I create the Derived map before the Base map?

In other words, can this:

CreateMap<DerivedEntity, DerivedDto>()
    .IncludeBase<BaseEntity, BaseDto>();

come before this:

CreateMap<BaseEntity, BaseDto>()

Jimmy Bogard

unread,
Jun 1, 2017, 12:18:30 PM6/1/17
to automapper-users
Yes, but only in later versions of AutoMapper (5.1 and later I believe)

--
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,
Jun 1, 2017, 6:03:48 PM6/1/17
to AutoMapper-users
Thanks!


On Thursday, June 1, 2017 at 9:18:30 AM UTC-7, Jimmy Bogard wrote:
Yes, but only in later versions of AutoMapper (5.1 and later I believe)
On Thu, Jun 1, 2017 at 11:16 AM, <cjm.ai...@gmail.com> wrote:
When setting up a configuration, can I create the Derived map before the Base map?

In other words, can this:

CreateMap<DerivedEntity, DerivedDto>()
    .IncludeBase<BaseEntity, BaseDto>();

come before this:

CreateMap<BaseEntity, BaseDto>()

--
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-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages