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
5b0e0166ee
commit
d40ad6d309
@ -36,13 +36,18 @@ Using SqlSugar is very simple , And it's powerful.
|
|||||||
### Feature1 : Join query
|
### Feature1 : Join query
|
||||||
Super simple query syntax
|
Super simple query syntax
|
||||||
```cs
|
```cs
|
||||||
var query5 = db.Queryable<Order>()
|
var query = db.Queryable<Order>()
|
||||||
.LeftJoin<Custom> ((o, cus) => o.CustomId == cus.Id)
|
.LeftJoin<Custom> ((o, cus) => o.CustomId == cus.Id)
|
||||||
.LeftJoin<OrderItem> ((o, cus, oritem ) => o.Id == oritem.OrderId)
|
.LeftJoin<OrderItem> ((o, cus, oritem ) => o.Id == oritem.OrderId)
|
||||||
.LeftJoin<OrderItem> ((o, cus, oritem , oritem2) => o.Id == oritem2.OrderId)
|
.LeftJoin<OrderItem> ((o, cus, oritem , oritem2) => o.Id == oritem2.OrderId)
|
||||||
.Where(o => o.Id == 1)
|
.Where(o => o.Id == 1)
|
||||||
.Select((o, cus) => new ViewOrder { Id = o.Id, CustomName = cus.Name })
|
.Select((o, cus) => new ViewOrder { Id = o.Id, CustomName = cus.Name })
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
var list=db.Queryable<Test>()
|
||||||
|
.Includes(x => x.Provinces,x=>x.Citys ,x=>x.Street)
|
||||||
|
.Includes(x => x.ClassInfo)
|
||||||
|
.ToList();
|
||||||
```
|
```
|
||||||
```sql
|
```sql
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user