So let's say that I have a table with a relation with itself, for example
Table Page
-------------
IDPage
description
IDPage_FK <-- foreign key
Now this table it's mapped by entity framework like this
Class Page
-----------
int IDPage
string description
int IDPage_FK
Page Page1
IColletion<Page> Page2
What I want to archive if it's possible, it's created a linq expression to navigate on all the table an make an output like this in a string variable:
Assuming this values in the table
IDPage Description IDPage_FK
1 Example null
2 Example2 1
3 Example3 2
This output on a string variable
string inheritance = (from P in Page Select....)
The output will be like this
Example > Example2 > Example3
It's possible? or Do I have to create a method to loop into each element an create the variable?