开发者

How to implement Azure table pagination

开发者 https://www.devze.com 2023-02-17 02:34 出处:网络
I would like to know how to implement pagination on Azure table storage? Since Azure table storage does not support \"Skip()\" LINQ operation, it is impossible to implement pagination functionality s

I would like to know how to implement pagination on Azure table storage?

Since Azure table storage does not support "Skip()" LINQ operation, it is impossible to implement pagination functionality straight forward. It seems it could only be done via Continuations tokens. But the problem is I could not find the proper example how to do it most elegantly. Can you provide me such simple Azure table pagin开发者_如何学编程ation example?

In SQL world the core pagination statement would look like:

_context.DataTable.Where(r => r.SomeData == data1 && r.SomeData2 ==
(int)data2 && r.SomeData3 == (int)data3).Skip(10).Take(10).ToList();

Here we get a returned "page". Azure table example?


one approach is to get the collection of the tokens and page through that, then reference back to the table for the rest of the data, that might or may not work for you though, depending on your match conditions

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号