Last active
March 7, 2018 19:02
-
-
Save dstarr/d6d7027de80cc7622ed91d896736d1be to your computer and use it in GitHub Desktop.
Deleting all the files in the Azure Cosmos DB,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task ModifyAllDocs() | |
{ | |
List<SensorTick> docs = _client.CreateDocumentQuery<SensorTick>(_dbcUri).ToList(); | |
foreach (var doc in docs) | |
{ | |
doc.Temperature += 100; | |
Uri docUri = UriFactory.CreateDocumentUri(DbName, CollectionName, doc.Id); | |
await _client.ReplaceDocumentAsync(docUri.ToString(), doc); | |
Console.WriteLine(@"Updated: {0}", doc.Id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment