Exemple #1
0
 private void DoBulkLoad(List<TableSet> tableSets)
 {
     if (tableSets.Any(ts => ts.Enabled && ts.Mappings.Any(tm => tm.TruncateDestinationAndBulkLoadFromSource)))
     {
         try
         {
             tableSetData.ResetTruncateSettingToFalse();
             foreach ( var tableset in tableSets.Where(
                         ts => ts.Enabled && ts.Mappings.Any(tm => tm.TruncateDestinationAndBulkLoadFromSource)))
             {
                 var bulkLoader = new BulkLoader(tableset);
                 bulkLoader.TruncateDestinationTables();
                 bulkLoader.BulkLoadDestinationTables();
             }
         }
         catch (Exception exception)
         {
             exception.WriteToApplicationLog();
         }
     }
 }
Exemple #2
0
 private void DoBulkLoad(List<TableSet> tableSets)
 {
     if (tableSets.Any(ts => ts.Enabled && ts.Mappings.Any(tm => tm.TruncateDestinationAndBulkLoadFromSource)))
     {
         try
         {
             tableSetData.ResetTruncateSettingToFalse();
             foreach ( var tableset in tableSets.Where(
                         ts => ts.Enabled && ts.Mappings.Any(tm => tm.TruncateDestinationAndBulkLoadFromSource)))
             {
                 var bulkLoader = new BulkLoader(tableset);
                 bulkLoader.TruncateDestinationTables();
                 bulkLoader.BulkLoadDestinationTables();
             }
         }
         catch (Exception exception)
         {
             exception.WriteToApplicationLog();
         }
     }
 }