This commit is contained in:
sunkaixuan 2019-05-20 13:54:11 +08:00
parent 4964904f2f
commit 1ed824922a

View File

@ -257,6 +257,26 @@ namespace OrmTest.Demo
JoinType.Left,st.SchoolId==sc.Id JoinType.Left,st.SchoolId==sc.Id
}).ToPageList(pageIndex, pageSize, ref totalCount); }).ToPageList(pageIndex, pageSize, ref totalCount);
var queryable = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
});
queryable.Count();
queryable.ToList();
var queryable2 = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).Select<Student>().MergeTable();
queryable2.Count();
queryable2.ToList();
var queryable3 = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).Select<Student>().MergeTable().ToPageList(1,2,ref totalCount);
//top 5 //top 5
var top5 = db.Queryable<Student>().Take(5).ToList(); var top5 = db.Queryable<Student>().Take(5).ToList();