Newbie question ref AutoMapper

23 views
Skip to first unread message

pgr_...@hotmail.com

unread,
May 3, 2017, 8:27:53 AM5/3/17
to AutoMapper-users
Hi,

Quick newbie question about Automapper.

I have the following code:

    CreateMap<MyDataContract, MyViewModel>()
        .MapFrom(s => s.Trans, d => d.Trans);

In the DataContract, MyDataContract, I have the following:

    [DataMember]
    public IEnumerable<ReferTypeDataContract> Refer { get; set;} 

I am trying to find out how Automapper is mapping this from the above createmap to the ReferTypeDataContract. Is there any visual tools to examine this, so some debug code that can be added?

Paul.

Jimmy Bogard

unread,
May 3, 2017, 9:23:06 AM5/3/17
to automapper-users
I have no idea, you have a lot of code missing here. But in general you can view the expression, do Mapper.Configuration.FindTypeMapFor<MyDataContract, MyViewModel>() and look at the MapExpression.

--
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.

Reply all
Reply to author
Forward
0 new messages