This is problematic for cases when the id is not an int (maybe a string) but it looks like one. We should completely remove this behavior, the caller should parse the id instead (it'll always be a string now):
await _paginationService.KeysetPaginateAsync(
query,
b => b.Descending(x => x.Created),
async id => await _dbContext.Posts.FindAsync(int.Parse(id)));
Today we try to automatically parse the id in after/value as an
int
: https://github.com/mrahhal/MR.AspNetCore.Pagination/blob/9a9b137c7cf081d9da8566dd7340c24d63857b96/src/MR.AspNetCore.Pagination/PaginationService.cs#L305-L329This is problematic for cases when the id is not an int (maybe a string) but it looks like one. We should completely remove this behavior, the caller should parse the id instead (it'll always be a string now):