Something similar to this
Ex
var temp = dbcontext.ModelA.include(x=>x.ModelB.where(...))
var temp = dbcontext.ModelA.include(x=>x.ModelB.Any(...))
Yes filtered includes are supported, but only as of EF Core 5.0, which would allow you to use Where
.
According to the docs:
Supported operations are:
Where
,OrderBy
,OrderByDescending
,ThenBy
,ThenByDescending
,Skip
, andTake
.
However, using Any
directly does not make sense, because it returns bool
rather than a subset of related entities.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.