Table​Batch​Operation Class

Definition

Represents a batch operation on a table.

public sealed class TableBatchOperation : System.Collections.Generic.ICollection<Microsoft.WindowsAzure.Storage.Table.TableOperation>, System.Collections.Generic.IEnumerable<Microsoft.WindowsAzure.Storage.Table.TableOperation>, System.Collections.Generic.IList<Microsoft.WindowsAzure.Storage.Table.TableOperation>
Inheritance
TableBatchOperation
Implements

Remarks

A batch operation is a collection of table operations which are executed by the Storage Service REST API as a single atomic operation, by invoking an Entity Group Transaction.

A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. A batch with a retrieve operation cannot contain any other operations. Note that the total payload of a batch operation is limited to 4MB.

Constructors

Table​Batch​Operation()

Initializes a new instance of the TableBatchOperation class.

Properties

Count

Gets the number of operations in this TableBatchOperation.

Is​Read​Only

Gets a value indicating whether the TableBatchOperation is read-only.

Item[​Int32]

Gets or sets the TableOperation item at the specified index.

Methods

Add(​Table​Operation)

Adds the TableOperation to the TableBatchOperation.

Clear()

Clears all TableOperation objects from the TableBatchOperation.

Contains(​Table​Operation)

Returns true if this TableBatchOperation contains the specified element.

Copy​To(​Table​Operation[], ​Int32)

Copies all the elements of the TableBatchOperation to the specified one-dimensional array starting at the specified destination array index.

Delete(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that deletes the specified entity from a table.

Get​Enumerator()

Returns an IEnumerator<T> for the TableBatchOperation.

Index​Of(​Table​Operation)

Returns the zero-based index of the first occurrence of the specified TableOperation item, or -1 if the TableBatchOperation does not contain the item.

Insert(​ITable​Entity, ​Boolean)

Adds a TableOperation object that inserts the specified entity into the table as part of the batch operation.

Insert(​Int32, ​Table​Operation)

Inserts a TableOperation into the TableBatchOperation at the specified index.

Insert(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table.

Insert​Or​Merge(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table if the entity does not exist; if the entity does exist then its contents are merged with the provided entity.

Insert​Or​Replace(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that inserts the specified entity into a table if the entity does not exist; if the entity does exist then its contents are replaced with the provided entity.

Merge(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that merges the contents of the specified entity with the existing entity in a table.

Remove(​Table​Operation)

Removes the specified TableOperation item from the TableBatchOperation.

Remove​At(​Int32)

Removes the TableOperation at the specified index from the TableBatchOperation.

Replace(​ITable​Entity)

Adds a TableOperation to the TableBatchOperation that replaces the contents of the specified entity in a table.

Retrieve(​String, ​String)

Adds a TableOperation to the TableBatchOperation that retrieves an entity with the specified partition key and row key.

Retrieve<​TElement>(​String, ​String, ​List<​String>)

Inserts a TableOperation into the batch that retrieves an entity based on its row key and partition key. The entity will be deserialized into the specified class type which extends ITableEntity.

Retrieve<​TResult>(​String, ​String, ​Entity​Resolver<​TResult>, ​List<​String>)

Adds a table operation to retrieve an entity of the specified class type with the specified partition key and row key to the batch operation.

Explicit Interface Implementations

I​Enumerable.​Get​Enumerator()

Returns an IEnumerator.

Extension Methods

IsDefined(Object)
IsNull(Object)
IsPrimitive(Object)