High level something like this
SELECT 'your colmns' FROM your table LIMIT 10 OFFSET 10;
In code you would have a variable for how many records to return e.g. pageSize then an offset, where to start with. So for instance there are 100 records, page size is 10. You would get the first 10 records then next time starting at positon 11 and get next ten records etc.
$"SELECT 'your colmns' FROM your table LIMIT {pageSize} OFFSET {offset};";
Just coded something very similar last night for a C#8 features, might give you ideas.
Anytime I've needed pagination it's been with a 3rd product so nothing to show code-wise.
---