Exemple #1
0
        public void CanGenerateMappingDoc()
        {
            // Need a separate config so we can get hold of the mapper after using it.
            // If we use the existing config we get a duplicate mapping exception.
            var config = NHibernateInitializer.CreateConfiguration();

            var mapper = new ConventionModelMapper();

            mapper.WithConventions(config);

            var mapping = mapper.CompileMappingFor(typeof(Entity).Assembly.GetExportedTypes());
            var x       = mapping.AsString();

            File.WriteAllText("../../NHibernateTests/Output.xml", x);
        }