mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update README.md
This commit is contained in:
parent
57c547f2f9
commit
18f0523400
10
README.md
10
README.md
@ -111,3 +111,13 @@ var s3 = db.Queryable<Student>().Select(it => new { newid = it.Id }).ToList();
|
||||
var s4 = db.Queryable<Student>().Select(it => new { newid = it.Id, obj = it }).ToList();
|
||||
var s5 = db.Queryable<Student>().Select(it => new ViewModelStudent2 { Student = it, Name = it.Name }).ToList();
|
||||
```
|
||||
|
||||
### 1.7 Sql Join Sql
|
||||
```c
|
||||
var join3 = db.Queryable("Student", "st")
|
||||
.AddJoinInfo("School", "sh", "sh.id=st.schoolid")
|
||||
.Where("st.id>@id")
|
||||
.AddParameters(new { id = 1 })
|
||||
.Select("st.*").ToList();
|
||||
//SELECT st.* FROM [Student] st Left JOIN School sh ON sh.id=st.schoolid WHERE st.id>@id
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user