Hi friends,
I have a self referential category table as you see:
I want to parse this table to find out tree level for each category. for example if root node level is 0 then CPU and Hard Drive and VGA and RAM are in level 1 and so on. how can I handle that?
I created a dictionary to put each category ID and its Level:
Dictionary<int, int> dic = new Dictionary<int, int>();
the Key is CategoryId and Value is Level. please help me how can I Fill the Dictionary?