CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); CloudTable table = tableClient.GetTableReference(tableName); TableBatchOperation batch = new TableBatchOperation(); foreach (string rowKey in rowKeysToDelete) { batch.Delete(new DynamicTableEntity(partitionKey, rowKey) { ETag = "*" }); } table.ExecuteBatch(batch);
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); CloudTable table = tableClient.GetTableReference(tableName); TableBatchOperation batch = new TableBatchOperation(); foreach (MyEntity entity in entitiesToInsert) { batch.Insert(entity); } table.ExecuteBatch(batch);These examples demonstrate how to use the ExecuteBatch method to perform batch delete and insert operations on Azure Table Storage entities. The Microsoft.WindowsAzure.Storage.Table package library is used to access Azure Table Storage.