I have a table which has a tree structure in itself.
Id ParentId Name
----------------
1 null x
2 null y
3 null z
4 null t
5 1 xx
6 1 xy
7 1 xz
8 2 yx
9 2 yy
10 9 yyx
11 10 yyxx
12 11 yyxxx
I want to retrieve the whole sub-tree under a root node. When my root node is "x" I want to get the set of nodes {1, 5, 6, 7, 10, 11, 12}. How can I do that by linq?