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="}

--

--

--

Nerd coder, gamer, 24/7 watching memes

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The A to Z of Microservice Architecture

Project #10: ESP32 Publish Sensor Readings to Google Sheets

Tips and Tricks to using PostgreSQL Docker Image

Introduction to cross browser testing

How I aced Google’s Associate Cloud Engineer Exam in two months

Introduction To Binary Trees In Java

Introducing Aptik Theme Manager

What is KSPM? An Intro to Kubernetes Security Posture Management

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
Bhone Myint Kyaw

Bhone Myint Kyaw

Nerd coder, gamer, 24/7 watching memes

More from Medium

[Dot Net Core](Graphic series )6. MiddleWare –How to work in .NET Core

Factory Design Pattern with Dependency Injection (Notepad Series #4)

How to implement Logging with Asp.Net Core, Elasticsearch and Kiabana

Java like Enums in C#