mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update README.md
This commit is contained in:
parent
6caaaacca2
commit
e9c8ae2af2
19
README.md
19
README.md
@ -17,3 +17,22 @@
|
|||||||
var getByFuns = db.Queryable<Student>().Where(it => NBORM.IsNullOrEmpty(it.Name)).ToList();
|
var getByFuns = db.Queryable<Student>().Where(it => NBORM.IsNullOrEmpty(it.Name)).ToList();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
###1.3 Page
|
||||||
|
```c
|
||||||
|
var pageIndex = 1;
|
||||||
|
var pageSize = 2;
|
||||||
|
var totalCount = 0;
|
||||||
|
//page
|
||||||
|
var page = db.Queryable<Student>().ToPageList(pageIndex, pageSize, ref totalCount);
|
||||||
|
|
||||||
|
//page join
|
||||||
|
var pageJoin = db.Queryable<Student, School>((st, sc) => new object[] {
|
||||||
|
JoinType.Left,st.SchoolId==sc.Id
|
||||||
|
}).ToPageList(pageIndex, pageSize, ref totalCount);
|
||||||
|
|
||||||
|
//top 5
|
||||||
|
var top5 = db.Queryable<Student>().Take(5).ToList();
|
||||||
|
|
||||||
|
//skip5
|
||||||
|
var skip5 = db.Queryable<Student>().Skip(5).ToList();
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user