Update exp to sql

This commit is contained in:
sunkaixuan
2022-04-13 18:25:00 +08:00
parent 6fb102de29
commit 1af0b3b053
4 changed files with 20 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ namespace OrmTest
var list2 = db.Queryable<StudentA>()
.Includes(x => x.SchoolA, x => x.RoomList)//2个参数就是 then Include
.Includes(x => x.Books)
.Where(x=>x.Books.Any())
.Where(x=>x.Books.Any(z=>z.BookId==1))
.Where(x => x.SchoolA.SchoolName == "北大")
.ToList();