I want to use Dapper with the most popular pagination package on Nuget - X.PagedList.
Here is an example usage of X.PagedList from their website:

It needs IQueryable but Dapper returns IEnumerable:
var posts = await _dbConnection.QueryAsync<PostDTO>(
"SELECT * FROM Posts WHERE Title LIKE @SearchTerm",
new
{
SearchTerm = "%" + request.SearchTerm + "%"
});
How can I solve that problem?
- AsQueryable() isn't a solution
- not using Dapper isn't a solution because it protects against SQL injection