我是Azure表存儲新手。我想在表格中得到總行數。獲取Azure錶行數
目前蔭做這樣的事情: -
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;
}
這目前通過所有的表項讀取。當涉及較少的記錄時,這可以正常工作。但是我擔心記錄何時會增加,這種方法會很乏味。
有沒有其他優雅的方式來做到這一點?
我在用於.NET * GitHub項目的* Microsoft Azure存儲庫上打開此問題:[功能請求:API以獲取CloudTable的計數](https://github.com/Azure/azure-storage-net /問題/ 469)。 – 0xced 2017-06-01 08:54:53