// Create a batch operation TableBatchOperation batchOperation = new TableBatchOperation(); // Add the delete operation for each entity in the table foreach (var entity in cloudTable.ExecuteQuery(new TableQuery())) { batchOperation.Delete(entity); } // Clear all the entities in the table in a single batch operation cloudTable.ExecuteBatch(batchOperation);
// Create a batch operation TableBatchOperation batchOperation = new TableBatchOperation(); // Add the delete operation for each entity that meets the condition foreach (var entity in cloudTable.ExecuteQuery(new TableQuery().Where("PartitionKey eq 'someValue'"))) { batchOperation.Delete(entity); } // Clear all the entities that meet the condition in a single batch operation cloudTable.ExecuteBatch(batchOperation);Package Library: Microsoft.Azure.Cosmos.Table.