mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Subquery
This commit is contained in:
@@ -52,6 +52,12 @@ namespace OrmTest.Demo
|
||||
id = SqlFunc.Subqueryable<School>().Where(s => s.Id == st.Id).Select(s => s.Id)
|
||||
})
|
||||
.ToList();
|
||||
|
||||
var getAll4 = db.Queryable<Student>().Select(it =>
|
||||
new {
|
||||
name = it.Name,
|
||||
id = SqlFunc.Subqueryable<School>().Where(s => s.Id == it.Id).Select(s => s.Id)
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
private static void Async()
|
||||
|
Reference in New Issue
Block a user