Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Tables client library for .NET , Pageable<T> class does not implement Count() #43375

Closed
SiyabongaVulindlelaBlessingMngomezulu opened this issue Apr 12, 2024 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Tables

Comments

@SiyabongaVulindlelaBlessingMngomezulu

Type of issue

Typo

Description

Pageable queryResultsFilter = tableClient.Query(filter: $"PartitionKey eq '{partitionKey}'");

// Iterate the to access all queried entities.
foreach (TableEntity qEntity in queryResultsFilter)
{
Console.WriteLine($"{qEntity.GetString("Product")}: {qEntity.GetDouble("Price")}");
}

Console.WriteLine($"The query returned {queryResultsFilter.Count()} entities.");

The code above has an issue, the object queryResultsFilter which is of type Pageable does not and cannot have Count() as a method, since Pageable does not have this method and the IEnumerable interface that it inherits from does not have this method either

Page URL

https://learn.microsoft.com/en-us/dotnet/api/overview/azure/data.tables-readme?view=azure-dotnet#query-table-entities

Content source URL

https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/api/overview/azure/latest/data.tables-readme.md

Document Version Independent Id

3fb63a45-2bc7-408e-7365-cb7f9fefc8c7

Article author

@azure-sdk

Metadata

  • ID: 577bf9ad-b1b2-f48d-88bf-425ef7f9004c
  • Service: tables
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Tables labels Apr 12, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@christothes
Copy link
Member

Hi @SiyabongaVulindlelaBlessingMngomezulu
While I agree this sample probably shouldn't use Count(), it is valid as an extension method provided by Linq https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.count

@SiyabongaVulindlelaBlessingMngomezulu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Tables
Projects
None yet
Development

No branches or pull requests

2 participants