示例#1
0
 private static void CleanTables()
 {
     using (var connection = new FbConnection(
                ConnectionUtils.GetConnectionString()))
     {
         FirebirdTestObjectsInitializer.CleanTables(connection);
     }
 }
示例#2
0
        private static void DropDatabase()
        {
            FbConnection.ClearAllPools();

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

            if (File.Exists(connectionStringBuilder.Database))
            {
                FbConnection.DropDatabase(connectionStringBuilder.ConnectionString);
            }
        }
示例#3
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);
            }
        }
示例#4
0
 private static void CreateDatabase()
 {
     FbConnection.CreateDatabase(ConnectionUtils.GetConnectionString(), 16384, true, false);
 }
 private FirebirdStorage CreateStorage()
 {
     return(new FirebirdStorage(
                ConnectionUtils.GetConnectionString(),
                _options));
 }