public async Task Save(QueryModel queryModel) { queryModel.partitionKey = PartitionKeyGenerator.Generate(queryModel.id, _noOfPartitions); await DocumentDbRetryPolicy.ExecuteWithRetries( () => _client.UpsertDocumentAsync(GetCollectionUri(), queryModel, null, disableAutomaticIdGeneration: true) ); }
private RequestOptions CreateRequestOptions(Guid id) { var key = PartitionKeyGenerator.Generate(id, _noOfPartitions); var options = new RequestOptions() { PartitionKey = new PartitionKey(key) }; return(options); }