Update README.md

This commit is contained in:
果糖网 2022-07-17 14:20:27 +08:00 committed by GitHub
parent f26e65edf5
commit 9f3108c390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,23 +59,24 @@ WHERE
```
### Feature2 :Include Query、Insert、Delete and Update
```cs
//query by nav
var list=db.Queryable<Test>()
.Includes(x => x.Provinces,x=>x.Citys ,x=>x.Street) //multi-level
.Includes(x => x.ClassInfo)
.ToList();
//insert by nav
db.InsertNav(list) //Finer operation than EFCore's SaveChange
.Include(z1 => z1.SchoolA)
.ThenInclude(z1 => z1.RoomList)
.Include(z1 => z1.Books)
.ExecuteCommand();
//delete by nav
db.DeleteNav<Student>(it=>it.Id==1)
.Include(z1 => z1.SchoolA)
.ThenInclude(z1 => z1.RoomList) st
.Include(z1 => z1.Books)
.ExecuteCommand();
//update by nav
db.UpdateNav(list)
.Include(z1 => z1.SchoolA)
.ThenInclude(z1 => z1.RoomList)