Mapping By code: Handling all with custom ModelInspector

19 views
Skip to first unread message

FaticaLabs

unread,
Sep 1, 2011, 5:59:42 AM9/1/11
to nhusers
Hi all,
I have a scenario in which I suppose I can handle the whole mapping by
conventions. So a custom model inspector plus the model mapper events
should allow me to do all the job. I eventually end with having all
empty ClassMapping<T> for each entity in the model, just to being able
to feed the ModelMapper, that accepts just classes implementing
IConformistHolderProvider. Is there some way to tell ModelMapper to
map a suite of entity directly ? My model inspector would care about
specifyng properies, id's and so on.
Thanks !

FaticaLabs

unread,
Sep 1, 2011, 6:58:14 AM9/1/11
to nhusers
Well I found myself:
I was using
mapper.CompileMappingForAllExplicitlyAddedEntities();

I can achieve what i need by using

mapper.CompileMappingFor(...)
and passing the needed types.

Fabio Maulo

unread,
Sep 1, 2011, 11:50:02 AM9/1/11
to nhu...@googlegroups.com

Giulio Petrucci

unread,
Sep 1, 2011, 12:40:30 PM9/1/11
to nhu...@googlegroups.com
Hi Fabio,

On Thu, Sep 1, 2011 at 5:50 PM, Fabio Maulo <fabio...@gmail.com> wrote:
> ConfORM sound track
> http://www.dailymotion.com/video/x3m33n_gala-come-into-my-life_music

So 90s... I love it! :-)

Ciao,
Giulio

--

FaticaLabs

unread,
Sep 2, 2011, 2:47:17 AM9/2/11
to nhusers
Reply all
Reply to author
Forward
0 new messages