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
Kenneth Ellingsen
NA
1
1.6k
Add db output to list within list
Mar 8 2013 6:03 AM
Hi,
My db output contains of n rows, and each row contains five colomns like this:
content1
content2
content3
content4
content5
My contract I want to add this output too look like this:
Portfolio(content1, content2, Subportfolio[])
Subportfolio(content3, content4,content5)
I read first row from db output, and add data to Portfolio and Subportfolio.
For the next db row I must to check if both content1 and content2 are same as in first db row. If this is true, I would like to add a second instance of SubPortolio to the first Portfolio.
I have come so far as to check if second row equal frist row. But how to proceed to add a second SubPortfolio inside the first Portfolio?
Types:
IEnumerable<Portfolio>
IEnumerable<SubPortfolio>
Reply
Answers (
1
)
jagged array
Sort a field with in a 2D Array