Closed AliRafiee closed 3 years ago
For storage table end point, Use TableQuery.Take() method. var query = new TableQuery().Where(...).Take(100);
For anyone else who finds this, set the TakeCount
property on your query to limit this.
TableRequestOptions.TableQueryMaxItemCount
does nothing.
var query = new TableQuery<TableRowModel>()
.Where(TableQuery.GenerateFilterCondition("RuntimeStatus", QueryComparisons.Equal, "Running")); // Example where clause
query.TakeCount = 10; // Limit query to 10 items
var results = _instancesTable.ExecuteQuery(query).ToList();
Hi,
I'm using Microsoft.Azure.Cosmos.Table to query a storage account table. I'm trying to get a max of 100 items per query.
This is my query:
What I get instead is: Got 530 items Got 0 items Got 200 items Got 67 items Got 0 items Got 100 items Got 300 items Got 300 items Got 0 items Got 199 items Got 304 items Total = 2000
I'm not sure what I'm doing wrong here.