C# EF+Linq分页

数据库表名Customer。

var demo = (from u in dbContext.Customer

                        where u.Id > 0

                        orderby u.Id //默认升序ascending,降序descending

                        select u).Skip(10).Take(5);  //越过10条取5条(等于每页5条,取第三页)

猜你喜欢

转载自blog.csdn.net/xoofly/article/details/84317402