Need help printing sql data in treeview format in console

I am trying to print data from sql in c# console in tree view format, so that if I were to change data from table by increasing a number or changing a letter treeview should adapt to changes and indent the child folders.

My code so far: https://i.imgur.com/bYM1H68.png My sql table: https://i.imgur.com/g6DfXQT.png What I want it to look like: https://i.imgur.com/AiYvUiu.png Random example of treeview format: https://i.imgur.com/lpqUrVv.jpg

submitted by /u/Csharped
[link] [comments]

Leave a Reply