コード例 #1
0
        public async Task <ICollection <T> > ReadAllItemsAsync()
        {
            List <T> allItems = new List <T>();

            var pageSize = 50;
            var hasMore  = true;

            while (hasMore)
            {
                var pageOfItems = await table.Skip(allItems.Count).Take(pageSize).ToListAsync();

                if (pageOfItems.Count > 0)
                {
                    allItems.AddRange(pageOfItems);
                }
                else
                {
                    hasMore = false;
                }
            }
            return(allItems);
        }
コード例 #2
0
 public async Task <ICollection <T> > ReadItemsAsync(int start, int count)
 {
     return(await table.Skip(start).Take(count).ToListAsync());
 }
コード例 #3
0
        public async Task <ICollection <T> > GetAll() => await table.ToListAsync(); // This will only get as many as the server is willing to return

        public async Task <ICollection <T> > GetItems(int start, int end) => await table.Skip(start).Take(end).ToListAsync();
コード例 #4
0
 public async Task <ICollection <Recipe> > GetRecipes(int start, int end)
 {
     return(await recipeTable.Skip(start).Take(end).ToListAsync());
 }
コード例 #5
0
 public IMobileServiceTableQuery <T> Skip(int count)
 {
     return(_syncTable.Skip(count));
 }