0

在我的项目中,我使用带导航的实体框架,

我在模型中有 3 个表

1. Person
2. Family
3. Folder

在文件夹表中我有导航 family_Id 在家庭中我有导航 person_Id

在我写的代码中

var load = mh.Folder.Include("family_Id");

然后我知道所有家庭列现在我想知道 Person 表中的 Person_Name 如何包含 person 表?

Person 表不是导航到文件夹

4

1 回答 1

1

如果实体都与导航属性相关,您可以执行以下操作:

var load = mh.Folder.Include("Family").Include("Family.Person");
于 2013-02-06T13:00:33.160 回答