简体   繁体   English

如何在实体框架中加载嵌套导航属性?

[英]How to Load Nested navigation properties in Entity Framework?

If we have some nested collection (navigation property) in the entity model and this navigation also has a navigation property, what can you load using Entity Framework with minimal performance penalty?如果我们在实体 model 中有一些嵌套集合(导航属性),并且此导航也有导航属性,那么您可以使用实体框架加载什么而性能损失最小?

在此处输入图像描述

as use see the name of the navigation matters使用时请参阅导航事项的名称

You should use ThenInclude , to build up an expression tree您应该使用ThenInclude来构建表达式树

https://entityframeworkcore.com/querying-data-include-theninclude https://entityframeworkcore.com/querying-data-include-theninclude

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM