private Task <ResourceResponse <Document> > DeleteDocumentAsync(DocumentClient client, DocumentDescription document) { var options = document.PartitionKey != null ? new RequestOptions { PartitionKey = new PartitionKey(document.PartitionKey) } : new RequestOptions(); return(client.DeleteDocumentAsync(document.SelfLink, options)); }
public Task <ResourceResponse <Document> > GetDocumentAsync(Connection connection, DocumentDescription document) { var options = document.PartitionKey != null ? new RequestOptions { PartitionKey = new PartitionKey(document.PartitionKey) } : new RequestOptions(); return(GetClient(connection).ReadDocumentAsync(document.SelfLink, options)); }
public Task <ResourceResponse <Document> > GetDocumentAsync(Connection connection, DocumentDescription document) { var options = new RequestOptions { JsonSerializerSettings = new JsonSerializerSettings { DateParseHandling = DateParseHandling.None } }; if (document.HasPartitionKey) { options.PartitionKey = new PartitionKey(document.PartitionKey ?? Undefined.Value); } return(GetClient(connection).ReadDocumentAsync(document.SelfLink, options)); }