1

I'm playing with NH 3.2.0 mapping by code. Since I've a scenario in which I can map everithing by convention I would like to add raw entities to the mapper, and then customize them by a custom ModelInspector plus the event generated by the ModelMapper. Unfortunately the ModelMapper apparently does not allow me to add entity dirctly, instead he want object implementing IConformistHoldersProvider, so I eventually end with pass empty classes implementing ClassMapping for each entity I want to map. Is there some smartest way to achieve the same ?

Thanks.

Felice Pollano
  • 32,832
  • 9
  • 75
  • 115

1 Answers1

1

Well I found myself, problem was that I was using mapper.CompileMappingForAllExplicitlyAddedEntities(); the problem simply does not sussists if I use

 mapper.CompileMappingFor()

and I pass the required entities...

Felice Pollano
  • 32,832
  • 9
  • 75
  • 115