I have data from database like that :
id | description | parent_id
-----------------------------------------
1 | Record 1 | null
2 | Record 2 | 1
3 | Record 3 | null
4 | Record 4 | 2
5 | Record 5 | 3
I want to process using Linq, and it should be result like this :
Record 1
- Record 2
- Record 4
Record 3
- Record 5
I got solution : Recursive LINQ query: select item and all children with subchildren
but unfortunately the result only has two level, because i want the result in multi level > 2 levels (like a tree).
Any other best solution ? or how to modification that solution
Thanks in advance