Table of Contents

Class TableOperation

Namespace
Microsoft.WindowsAzure.Storage.Table
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents a single table operation.

public class TableOperation
Inheritance
TableOperation
Inherited Members

Properties

Entity

Gets the entity that is being operated upon.

public ITableEntity Entity { get; }

Property Value

ITableEntity

OperationType

Gets the type of operation.

public TableOperationType OperationType { get; }

Property Value

TableOperationType

Methods

Delete(ITableEntity)

Creates a new table operation that deletes the given entity from a table.

public static TableOperation Delete(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be deleted from the table.

Returns

TableOperation

The TableOperation object.

Insert(ITableEntity)

Creates a new table operation that inserts the given entity into a table.

public static TableOperation Insert(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be inserted into the table.

Returns

TableOperation

The TableOperation object.

Insert(ITableEntity, bool)

Creates a new table operation that inserts the given entity into a table.

public static TableOperation Insert(ITableEntity entity, bool echoContent)

Parameters

entity ITableEntity

The ITableEntity object to be inserted into the table.

echoContent bool

true if the message payload should be returned in the response to the insert operation. false otherwise.

Returns

TableOperation

The TableOperation object.

InsertOrMerge(ITableEntity)

Creates a new table operation that inserts the given entity into a table if the entity does not exist; if the entity does exist then its contents are merged with the provided entity.

public static TableOperation InsertOrMerge(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be inserted or merged.

Returns

TableOperation

The TableOperation object.

InsertOrReplace(ITableEntity)

Creates a new table operation that inserts the given entity into a table if the entity does not exist; if the entity does exist then its contents are replaced with the provided entity.

public static TableOperation InsertOrReplace(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be inserted or replaced.

Returns

TableOperation

The TableOperation object.

Merge(ITableEntity)

Creates a new table operation that merges the contents of the given entity with the existing entity in a table.

public static TableOperation Merge(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be merged.

Returns

TableOperation

The TableOperation object.

Replace(ITableEntity)

Creates a new table operation that replaces the contents of the given entity in a table.

public static TableOperation Replace(ITableEntity entity)

Parameters

entity ITableEntity

The ITableEntity object to be replaced.

Returns

TableOperation

The TableOperation object.

Retrieve(string, string, List<string>)

Creates a new table operation that retrieves the contents of the given entity in a table.

public static TableOperation Retrieve(string partitionKey, string rowkey, List<string> selectedColumns = null)

Parameters

partitionKey string

A string containing the partition key of the entity to be retrieved.

rowkey string

A string containing the row key of the entity to be retrieved.

selectedColumns List<string>

List of column names for projection.

Returns

TableOperation

The TableOperation object.

Retrieve<TResult>(string, string, EntityResolver<TResult>, List<string>)

Creates a new table operation that retrieves the contents of the given entity in a table.

public static TableOperation Retrieve<TResult>(string partitionKey, string rowkey, EntityResolver<TResult> resolver, List<string> selectedColumns = null)

Parameters

partitionKey string

A string containing the partition key of the entity to retrieve.

rowkey string

A string containing the row key of the entity to retrieve.

resolver EntityResolver<TResult>

The EntityResolver<T> implementation to project the entity to retrieve as a particular type in the result.

selectedColumns List<string>

List of column names for projection.

Returns

TableOperation

The TableOperation object.

Type Parameters

TResult

The return type which the specified EntityResolver<T> will resolve the given entity to.

Retrieve<TElement>(string, string, List<string>)

Creates a new table operation that retrieves the contents of the given entity in a table.

public static TableOperation Retrieve<TElement>(string partitionKey, string rowkey, List<string> selectColumns = null) where TElement : ITableEntity

Parameters

partitionKey string

A string containing the partition key of the entity to retrieve.

rowkey string

A string containing the row key of the entity to retrieve.

selectColumns List<string>

List of column names for projection.

Returns

TableOperation

The TableOperation object.

Type Parameters

TElement

The class of type for the entity to retrieve.

RotateEncryptionKey(KeyRotationEntity)

Creates a new table operation that rotates the content encryption key of the given entity in a table.

public static TableOperation RotateEncryptionKey(KeyRotationEntity entity)

Parameters

entity KeyRotationEntity

The KeyRotationEntity entity to have its key rotated. Must be the output of a call to an "ExecuteQueryForKeyRotation()" call.

Returns

TableOperation

The TableOperation object.