I am using the MobileServiceClient class provided by Azure to fetch data from my Azure SQL database. It appears that I am only getting the first 60 or so rows from my database when I use the ToListAsync() function. Is there a way around this?
List<riskregister_hazard_template> categories;
categories = await riskTable.Where(r => r.level_1 == _level1)
.Where(r => r.level_2 == _level2).ToListAsync();
Please read the following excerpt:
By default, a read operation in a table controller will return up to 50 items. If we have more in our table storage, then the client will need to request more, by casting the result of the ToListAsync or ToEnumerableAsync methods to the IQueryResultEnumerable interface. The code below shows how to go through all elements in the table.
Source: https://azure.microsoft.com/en-us/blog/better-support-for-paging-with-table-storage-in-azure-mobile-services-net-backend/
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com