I am new to Azure table storage. I want to get the total row count in a table.
Currently Iam doing something like this:-
public List<T> ReadAll(string partitionKey)
{
List<T> entities = new List<T>();
TableQuery<T> query = new TableQuery<T>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey.ToLower()));
entities = Table.ExecuteQuery(query).ToList();
return entities;
}
This currently reads through all the table entries. This works ok when it comes to less records. But I am concerned when the records would increase and this method would be tedious.
Is there any other elegant way to do it?