mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
-
This commit is contained in:
@@ -299,6 +299,12 @@ namespace OrmTest.Demo
|
||||
var list8 = db.Queryable<Student, School, School>((st, sc, sc2) => st.SchoolId == sc.Id && sc.Id == sc2.Id)
|
||||
.OrderBy(st=>st.Id)
|
||||
.Select((st, sc, sc2) => new { st.Name, st.Id, schoolName = sc.Name, schoolName2 = sc2.Name }).ToPageList(1, 2);
|
||||
|
||||
//In
|
||||
var list9 = db.Queryable<Student>("it")
|
||||
.OrderBy(it => it.Id)
|
||||
.In(it => it.Id,db.Queryable<School>().Where("it.id=schoolId").Select(it=>it.Id))
|
||||
.ToList();
|
||||
}
|
||||
public static void Funs()
|
||||
{
|
||||
|
@@ -27,7 +27,7 @@ namespace OrmTest.Demo
|
||||
JoinType.Left,st.SchoolId==sc.Id
|
||||
})
|
||||
.Select((st, sc) => new { id = st.Id, name = sc.Name })
|
||||
.SelectMergeAsTable().Where(XXX => XXX.id == 1).OrderBy("name asc").ToList();// Prefix, is, not, necessary, and take the columns in select
|
||||
.MergeTable().Where(XXX => XXX.id == 1).OrderBy("name asc").ToList();// Prefix, is, not, necessary, and take the columns in select
|
||||
|
||||
}
|
||||
private static void Where()
|
||||
|
Reference in New Issue
Block a user