mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
-
This commit is contained in:
parent
8a91c7fb88
commit
2e462e4f38
@ -1,5 +1,6 @@
|
||||
using OrmTest.Demo;
|
||||
using OrmTest.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -16,8 +17,19 @@ namespace OrmTest.Demo
|
||||
{
|
||||
Where();
|
||||
OrderBy();
|
||||
SelectMerge();
|
||||
}
|
||||
private static void SelectMerge()
|
||||
{
|
||||
var db = GetInstance();
|
||||
//page join
|
||||
var pageJoin = db.Queryable<Student, School>((st, sc) => new object[] {
|
||||
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
|
||||
|
||||
}
|
||||
private static void Where()
|
||||
{
|
||||
var db = GetInstance();
|
||||
|
Loading…
Reference in New Issue
Block a user