Condividi tramite


HashPartitionResolver.GetPartitionKey(Object) Method

Definition

Extracts the partition key from the specified document using the specified PartitionKeyPropertyName property or PartitionKeyExtractor function in order of preference in the Azure Cosmos DB service.

public virtual object GetPartitionKey (object document);
abstract member GetPartitionKey : obj -> obj
override this.GetPartitionKey : obj -> obj
Public Overridable Function GetPartitionKey (document As Object) As Object

Parameters

document
Object

A document object

Returns

object used as the partition key.

Implements

Exceptions

Thrown if unable to extract the partition key.

Applies to