This doesn't work, because class mappings are added to configuration after AfterMapClass is invoked. That means that when AfterMapClass is raised, cfg.ClassMappings does not contain mapping definition for the class yet - I just tried it. My code looks like this:
var cfg = new Configuration... var mapper = new ModelMapper(); AddMappingConventions(mapper); //register BeforeMapClass + AfterMapClass event handlers AddMappingsForAllEntities(mapper); //mapper.Class<>() var hbmMappings = mapper.CompileMappingForAllExplicitAddedEntities(); cfg.AddDeserializedMapping(hbmMappings, null); -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/xlRlft8YAWgJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
