I am using cosmos client and C# to delete items from a collection. In the process I would like to check the number of records that are in the collection, I have the data part of it and the query but I am stuck at what to use since I will be only be receiving an int not a stream of data.
For deleting data I am using FeedIterator since we get a stream of data. FeedIterator queryResultSetIterator = this.container.GetItemQueryIterator(queryDefinition);
List orders = new List();
I delete the records by looping through the list
What should I be using in place of FeedIterator since the output is going to be the number of records in the collection?
var sqlQueryText1 = "SELECT value count(1) from c where c.tenantId =
'5d484526d76e9653e6226aa2'";
QueryDefinition queryDefinition1 = new QueryDefinition(sqlQueryText1);
This is the article I used to help with the console app: https://learn.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started