public static int InvokeReplicatePackageStatisticsTask(string warehouseConnectionString)
 {
     ReplicatePackageStatisticsTask task = new ReplicatePackageStatisticsTask()
     {
         ConnectionString = new SqlConnectionStringBuilder(DataBaseHelper.DBConnectionString),
         WarehouseConnectionString = new SqlConnectionStringBuilder(warehouseConnectionString)
     };
     task.Execute();
     return task.Count;
 }
Beispiel #2
0
        private void Purge(string source, string destination)
        {
            Log.Trace("Purge data from the production database.");

            int originalKey = ReplicatePackageStatisticsTask.GetLastOriginalKey(destination);

            Log.Info("Purging PackageStatistics records that are in the warehouse. LastOriginalKey in warehouse is: {0}", originalKey);

            if (!WhatIf)
            {
                DeletePackageStatistics(source, originalKey);
            }
        }