Используя этот блок кодаПолучить все записи из хранилища лазури таблицы
try
{
StorageCredentials creds = new StorageCredentials(accountName, accountKey);
CloudStorageAccount account = new CloudStorageAccount(creds, useHttps: true);
CloudTableClient client = account.CreateCloudTableClient();
CloudTable table = client.GetTableReference("serviceAlerts");
TableOperation retrieveOperation = TableOperation.Retrieve<ServiceAlertsEntity>("ServiceAlerts", "b9ccd839-dd99-4358-b90f-46781b87f933");
TableResult query = table.Execute(retrieveOperation);
if (query.Result != null)
{
outline = outline + ((ServiceAlertsEntity) query.Result).alertMessage + " * ";
}
else
{
Console.WriteLine("No Alerts");
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Я могу получить единственную запись с перегородкой и RowKey упомянутой в извлечении.
Есть ли способ получить все записи, которые хранятся в разделе ServiceAlerts?
Я попробовал символ (*) для второго параметра
TableOperation retrieveOperation = TableOperation.Retrieve<ServiceAlertsEntity>(
"ServiceAlerts","b9ccd839-dd99-4358-b90f-46781b87f933");
но ничего не возвращает.
table.ExecuteQuery возвращает IEnumerable, который означает, что он принесет все данные по нескольким сервера раздела. Этот подход не является хорошим –