I have a department table with the following columns.
Id (PK) Name ParentDepartmentId (FK of same Department table)
Now I want to display all the data in a hierarchical order using LINQ. something like that:
IT .Net Web Developer Windows Developer Java PHP Technical Support OffLine Online
If IT has 3 sub-blocks .Net, Java, PHP. again .net has its own web developer and window developer etc.
How can I achieve this using LINQ. I am using ASP.Net MVC 3.0 using C #, Entity Framework, etc.
user946393
source share