Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Going inside continuation tokens and segmented queries


As we saw in the Using continuation tokens and server-side paging recipe, the Azure Storage library offers the capability to automatically handle the server-side pagination for queries that go over some boundaries (more than 1,000 entities, cross partition, and so on). Also, the library offers, through the concept of segmented queries, the capability to control the query process deeply, one iteration at a time.

Both Method1 and the Method2 have this capability through the ExecuteSegmented method of the TableServiceQuery<T> and TableQuery<T> classes, respectively. In addition, as the Azure Storage library uses the Common Language Runtime (CLR), this method is also provided with the Asynchronous Programming Model, to provide asynchronous versions in addition to that method, to nearly all the methods that access the Azure Storage service. The asynchronous methods that download lists, such as entities, tables, and so on, typically...