public void SetupBeforeEachTest() { this.automappingConfiguration = new SQLiteAtlasAutoMappingConfiguration(); this.fluentMapperConfigurer = new FluentAutoMapperConfigurer(); this.fluentMapperConfigurer.AutoMappingConfiguration(this.automappingConfiguration); this.configuration = new NHibernateConfiguration(new ConsoleLogger()); this.configuration.RegisterConfigurer(new SQLiteDatabaseConfigurer()); this.configuration.RegisterConfigurer(this.fluentMapperConfigurer); this.configuration.RegisterConfigurer(new ProxyConfigurer <CastleProxyFactoryFactory>()); }
public void CompareFluentAutoMapSchema() { var subSetConnectionString = ConfigurationManager.ConnectionStrings["PersistenceNHFluentAuto"].ConnectionString; var databaseConfigurer = new SqlServerDatabaseConfigurer() .ConnectionString(subSetConnectionString); var mapperConfigurer = new FluentAutoMapperConfigurer() .AutoMappingConfiguration(new SQLiteAtlasAutoMappingConfiguration()) .AutoMapEntitiesFromAssembly(Assembly.GetExecutingAssembly()) .RegisterConvention <NHibernate.Configuration.Fluent.Conventions.PropertyConvention>() .RegisterConvention <NHibernate.Configuration.Fluent.Conventions.DateTime2Convention>() .RegisterConvention <NHibernate.Configuration.Fluent.Conventions.VersionConvention>() .RegisterConvention <NHibernate.Configuration.Fluent.Conventions.XElementConvention>(); this.CompareSchema( subSetConnectionString, databaseConfigurer, mapperConfigurer, new ProxyConfigurer <CastleProxyFactoryFactory>()); }