c# - implementing a recursive linq -
so let's have table relation itself, example table page ------------- idpage description idpage_fk <-- foreign key now table it's mapped entity framework this class page ----------- int idpage string description int idpage_fk page page1 icolletion<page> page2 what want archive if it's possible, it's created linq expression navigate on table make output in string variable: assuming values in table idpage description idpage_fk 1 example null 2 example2 1 3 example3 2 this output on string variable string inheritance = (from p in page select....) the output this example > example2 > example3 it's possible? or have create method loop each element create variable? sorry, can't recursive linq out database - you'll either have write iterative function or create stored procedure you. similar question: how entity framework work recursive hierarchies? in