RangePartitionResolver<T>.ResolveForCreate
Method
Definition
Given a partition key, returns the correct collection self-link for creating a document using the range partition map in the Azure DocumentDB database service.
public virtual string ResolveForCreate (object partitionKey);
Parameters
- partitionKey
- Object
The partition key used to determine the target collection for create
Returns
The target collection link that will be used for document creation.
Exceptions
Thrown if partitionKey is null.
Thrown if the partitionKey is an invalid type or if none of the ranges match the specified partition key.
Remarks
If multiple ranges match the specified partitionKey, then the resolver returns one of the matching ranges. If none of the ranges match, then the method throws a InvalidOperationException. If partitionKey is null, then all collections are returned.