Cassandra pagination with asp.net core C#

CREATE TABLE users
(Code text,
Name text,
Accesstime TIMESTAMP,
PRIMARY KEY(Code, Accesstime));
Insert Into users (Code, Name,Accesstime) Values( ‘1111’,’CarbonTsunami’,’2021–06–06 15:12:51');
Insert Into users (Code, Name,Accesstime) Values( ‘2222’,’Bhone’,’2021–06–06 15:13:51');
Insert Into users (Code, Name,Accesstime) Values( ‘3333’,’Myint’,’2021–06–06 15:14:51');
Insert Into users (Code, Name,Accesstime) Values( ‘4444’,’Kyaw’,’2021–06–06 15:15:51');
Insert Into users (Code, Name,Accesstime) Values( ‘5555’,’David’,’2021–06–06 15:16:51');
User list
usermapper
getuser API with pagination
Request one (page 1)
https://localhost:44344/api/test/getuser?pageinfo=&pageSize=2
Response with page_result to be used in next request{"users":[{"Code":"1111","Name":"CarbonTsunami","Accesstime":"2021-06-06T15:12:51"},{"Code":"4444","Name":"Kyaw","Accesstime":"2021-06-06T15:15:51"}],"page_result":"AQIAAABlAAAAeyJ0b2tlbiI6IkNCQUFBQUFpY0Vtbnc2V2lXbGg5cmdiWDdTQmtDQWtBQUFBVEFBQUJlZUhrL0ZnSUJBQUFBQUlHQndjIiwicmFuZ2UiOnsibWluIjoiIiwibWF4IjoiRkYifX0="}Request two (page 2)
https://localhost:44344/api/test/getuser?pageinfo=AQIAAABlAAAAeyJ0b2tlbiI6IkNCQUFBQUFpY0Vtbnc2V2lXbGg5cmdiWDdTQmtDQWtBQUFBVEFBQUJlZUhrL0ZnSUJBQUFBQUlHQndjIiwicmFuZ2UiOnsibWluIjoiIiwibWF4IjoiRkYifX0=&pageSize=2
Response with page_result to be used in next request{"users":[{"Code":"2222","Name":"Bhone","Accesstime":"2021-06-06T15:13:51"},{"Code":"5555","Name":"David","Accesstime":"2021-06-06T15:16:51"}],"page_result":"AQQAAABlAAAAeyJ0b2tlbiI6IkNCQUFBQUFrZmlNNVFSblpvaTZQQ014Y0d1M1RDQWtBQUFBVEFBQUJlZUhsNXJnSUJBQUFBQUlHQndjIiwicmFuZ2UiOnsibWluIjoiIiwibWF4IjoiRkYifX0="}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store