public async Task DeleteAsync(string id, Option <object?> partitionKey, string?eTag, CancellationToken cancellationToken) { var options = new ItemRequestOptionsBuilder() .IfMatch(eTag) .Build(); await _containerGetter().DeleteItemAsync <JObject>( id, PartitionKeyHelper.Create(partitionKey) ?? PartitionKey.None, options, cancellationToken); }
public async Task <JObject> ReplaceAsync(string id, JObject document, Option <object?> partitionKey, string?eTag, CancellationToken cancellationToken) { var options = new ItemRequestOptionsBuilder() .IfMatch(eTag) .Build(); var response = await _containerGetter().ReplaceItemAsync( document, id, PartitionKeyHelper.Create(partitionKey), options, cancellationToken); return(response.Resource); }