private static DomainConfiguration BuildConfiguration(string database, DomainUpgradeMode upgradeMode)
        {
            var configuration = DomainConfigurationFactory.CreateForConnectionStringTest();

            configuration.ConnectionInfo = OverrideDatabase(configuration.ConnectionInfo, database);
            configuration.Types.Register(typeof(TestEntity));
            configuration.UpgradeMode = upgradeMode;
            return(configuration);
        }
        public void ConnectionStringTest()
        {
            #region Connection string sample

            // Creating new Domain configuration
            var config = DomainConfigurationFactory.CreateForConnectionStringTest();
            config.UpgradeMode = DomainUpgradeMode.Recreate;
            // Registering all types in the specified assembly and namespace
            config.Types.Register(typeof(Person).Assembly, typeof(Person).Namespace);
            // And finally building the domain
            var domain = Domain.Build(config);

            #endregion
        }
Exemple #3
0
 protected override DomainConfiguration BuildConfiguration()
 {
     return(DomainConfigurationFactory.CreateForConnectionStringTest());
 }
 private ConnectionInfo GetAlternativeConnectionInfo()
 {
     return(DomainConfigurationFactory.CreateForConnectionStringTest().ConnectionInfo);
 }