How to efficiently implement paging and total row count with Dapper in ASP.NET Core 6 for a table with millions of rows?
I am using Dapper in an ASP.NET Core 6 Web API, and I need to implement efficient paging for a table that contains millions of rows. Here’s my current SQL query for fetching paginated results: