コード例 #1
0
        private void SetMappings(NHibernate.Cfg.Configuration configuration)
        {
            var mapper = new ModelMapper();

            mapper.AddMappings(MappingExtensions.GetMappingsAssembly <TDbContext>().GetTypes());

            var mappings = mapper.CompileMappingForAllExplicitlyAddedEntities();

            configuration.AddMapping(mappings);

            SchemaMetadataUpdater.QuoteTableAndColumns(configuration, new MsSql2012Dialect());
        }