예제 #1
0
 private HbmMapping getMappings()
 {
     //Using the built-in auto-mapper
     var mapper = new ConventionModelMapper();
     var allEntities = MappingsAssembly.GetTypes().Where(t => t.Namespace == MappingsNamespace).ToList();
     mapper.AddAllManyToManyRelations(allEntities);
     mapper.ApplyNamingConventions();
     if (AutoMappingOverride != null) AutoMappingOverride(mapper);
     var mapping = mapper.CompileMappingFor(allEntities);
     showOutputXmlMappings(mapping);
     return mapping;
 }