Condividi tramite


TableEntity Class

Definition

Represents the base object type for a table entity in the Table service.

public class TableEntity : Microsoft.Azure.Cosmos.Table.ITableEntity
type TableEntity = class
    interface ITableEntity
Public Class TableEntity
Implements ITableEntity
Inheritance
TableEntity
Derived
Implements

Remarks

TableEntity provides a base implementation for the ITableEntity interface that provides ReadEntity(IDictionary<String,EntityProperty>, OperationContext) and WriteEntity(OperationContext) methods that by default serialize and deserialize all properties via reflection. A table entity class may extend this class and override the ReadEntity(IDictionary<String,EntityProperty>, OperationContext) and WriteEntity(OperationContext) methods to provide customized or better performing serialization logic.

Constructors

TableEntity()

Initializes a new instance of the TableEntity class.

TableEntity(String, String)

Initializes a new instance of the TableEntity class with the specified partition key and row key.

Properties

DisablePropertyResolverCache

Gets or sets the status of the property resolver cache for the TableEntity.

ETag

Gets or sets the entity's ETag. Set this value to '*' in order to force an overwrite to an entity as part of an update operation.

PartitionKey

Gets or sets the entity's partition key.

RowKey

Gets or sets the entity's row key.

Timestamp

Gets or sets the entity's timestamp.

Methods

ConvertBack<TResult>(IDictionary<String,EntityProperty>, EntityPropertyConverterOptions, OperationContext)

Returns a custom entity instance which is recomposed using the specified IDictionary<TKey,TValue> of property names to EntityProperty data typed values.

ConvertBack<TResult>(IDictionary<String,EntityProperty>, OperationContext)

Returns a custom entity instance which is recomposed using the specified IDictionary<TKey,TValue> of property names to EntityProperty data typed values.

Flatten(Object, EntityPropertyConverterOptions, OperationContext)

Flattens the entity and creates a IDictionary<TKey,TValue> of EntityProperty objects for all properties of the specified entity object.

Flatten(Object, OperationContext)

Flattens the entity and creates a IDictionary<TKey,TValue> of EntityProperty objects for all properties of the specified entity object.

ReadEntity(IDictionary<String,EntityProperty>, OperationContext)

Deserializes the entity using the specified IDictionary<TKey,TValue> that maps property names to typed EntityProperty values.

ReadUserObject(Object, IDictionary<String,EntityProperty>, OperationContext)

Deserializes a custom entity instance using the specified IDictionary<TKey,TValue> of property names to EntityProperty data typed values.

WriteEntity(OperationContext)

Serializes the IDictionary<TKey,TValue> of property names mapped to EntityProperty data values from this TableEntity instance.

WriteUserObject(Object, OperationContext)

Create a IDictionary<TKey,TValue> of EntityProperty objects for all the properties of the specified entity object.

Applies to