예제 #1
0
        public void InstallingSchemaShouldNotThrowAnException()
        {
            Assert.DoesNotThrow(() =>
            {
                DropDatabase();

                CreateDatabase();

                UseConnection(connection =>
                {
                    string prefix = "hangfire_tests_" + System.Guid.NewGuid().ToString().Replace("-", "_").ToLower();

                    FirebirdObjectsInstaller.Install(connection);
                });

                //DropDatabase();
            });
        }
예제 #2
0
        private static void RecreateDatabaseAndInstallObjects()
        {
            FbConnection.ClearAllPools();

            var connectionStringBuilder = new FbConnectionStringBuilder(ConnectionUtils.GetConnectionString());

            if (File.Exists(connectionStringBuilder.Database))
            {
                FbConnection.DropDatabase(connectionStringBuilder.ConnectionString);
            }

            FbConnection.CreateDatabase(connectionStringBuilder.ToString(), 16384, true, false);

            using (var connection = new FbConnection(connectionStringBuilder.ToString()))
            {
                FirebirdObjectsInstaller.Install(connection);
            }
        }