TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
santosh behera
NA
92
11.8k
Create a class of hierarchy list from list using LINQ
Apr 18 2016 4:51 AM
Hi
i have the below data , employee column consider as parent and each employee have invoice as child and each invoice have invoicedetails as subchild. i have binded this data into a list of class. now i want create hierarchy list from this list using LINQ
parent--->child--->subchild
Employee--->Invoice--->InvoiceDetails
List Data:
Employee invoice InvoiceDetails jan feb Mar Apr
E1 I1 ID1 1 2 10 5
E1 I1 ID2 1 3 11 6
E1 I1 ID3 1 4 12 7
E1 I2 ID1 1 5 13 8
E1 I2 ID2 1 6 14 9
E1 I2 ID3 1 7 15 10
E2 I1 ID1 1 8 16 11
E2 I1 ID2 1 10 17 12
Output :
E1
--I1
------ID1 1 2 10 5
------ID2 1 3 11 6
------ID3 1 4 12 7
--I2
------ID1 1 5 13 8
------ID2 1 6 14 9
------ID3 1 7 15 10
E2
--I1
---------ID1 1 8 16 11
---------ID2 1 10 17 12
Thanks
Reply
Answers (
1
)
LINQ and WCF Services
to read sub directories and all files in a directory