You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@xiaoxin1983 currently there is no supported way to write a single query that would include related entities for multiple derived types in the hierachy.
Issue #3910 in the backlog represents an enhancement that could allow this.
In the meanwhile my recommendation is to use separate queries, e.g.:
var as= ctx.Set<ClassBase>().OfType<ClassA>().Include(m=>m.NavigationA).ToList();varbs= ctx.Set<ClassBase>().OfType<ClassB>().Include(m=>m.NavigationB).ToList();
hi :
i have three classes like this:
in EFCore , I build model like this:
it works well.
then, i want get all EntityType ( typeof classbase) and include the navigation A/B
ctx.Set<ClassBase>().include( ...)
i do not know how, and i tried
but it's error
I need help ,thank you!
xiaoxin
The text was updated successfully, but these errors were encountered: