Now we will write a method that updates the document that represents the second scheduled competition. Specifically, the method changes the values for the dateTime and numberOfRegisteredCompetitors keys.
At the time I was writing this book, the only way to update the value of any key in a document stored in a Cosmos DB collection was to replace the document with a new one. Since the first version of Cosmos DB and the SQL API, this is the only way to update the values for keys in a document. In this case, we just need to update the values for two keys, but we will have to replace the entire document.
The following lines declare the code for the UpdateScheduledCompetition asynchronous ...
Get Guide to NoSQL with Azure Cosmos DB now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.