简体   繁体   中英

wpf and entity framework navigation property

in my Project i use entity framework with navigation,

I have 3 tables in the model

1. Person
2. Family
3. Folder

in the Folder table i have navigation family_Id in the Family i have navigation person_Id

in the code I wrote this

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

then i know all family Columns now i want to know the Person_Name from Person table how can i include the person table?

the Person table is not navigation to Folder

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

var load = mh.Folder.Include("Family").Include("Family.Person");

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.

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