Exemplo n.º 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();
         }
     }
 }
Exemplo n.º 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();
         }
     }
 }