Esempio n. 1
0
        public void WriteMappingsToFile()
        {
            var mappings = new AutoPersistenceModelGenerator().Generate();

            mappings.BuildMappings();
            mappings.WriteMappingsTo(DB_FOLDER_PATH + "maps/");
        }
Esempio n. 2
0
        public static IMappingConfiguration CreateWithoutOverrides(Assembly mappingAssembly)
        {
            var autoPersistenceModel =
                new AutoPersistenceModelGenerator().GenerateFromAssembly(mappingAssembly);

            var configuration = Fluently.Configure()
                                .Mappings(m => m.AutoMappings.Add(autoPersistenceModel));

            return(new AutoMappingConfiguration {
                _fluentConfiguration = configuration
            });
        }
Esempio n. 3
0
        public static IMappingConfiguration CreateWithOverrides <TClassInDomainObjectAssembly, TClassInMappingAssembly>()
        {
            var autoPersistenceModel =
                new AutoPersistenceModelGenerator().GenerateFromAssembly
                <TClassInDomainObjectAssembly, TClassInMappingAssembly>();

            var configuration = Fluently.Configure()
                                .Mappings(m => m.AutoMappings.Add(autoPersistenceModel));

            return(new AutoMappingConfiguration {
                _fluentConfiguration = configuration
            });
        }