Paging in servicestack ormlite

后端 未结 2 593
走了就别回头了
走了就别回头了 2021-02-07 20:28

I am looking for a good way to implement paging in ormlite and I found another question, which has this snippet:

var data = db.Select

(predicate).Ski
2条回答
  •  迷失自我
    2021-02-07 20:50

    Found the answer in ormlite's tests. Essentially we could use SqlExpressionVisitor's Limit() like this:

    var result = db.Select( q => q.Where(predicate).Limit(skip:5, rows:10 ) );

提交回复
热议问题