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
David Smith
NA
2k
0
c# Linq Take Selected Records
Oct 26 2017 5:46 PM
I need to loop to each table getting or taking 2 records at time until all tables have been iterated through or empty. So I want to use Linq to do this. I am assuming a while loop is needed overall instead of a foreach. The logic should go
-Take 2 records, do something, then proceed to next table,
-take 2 records do something, then proceed to next table.
-Once you have reach the last table, go back to the beginning of the collection of the tables and repeat the process. We cannot exit the loop until all tables have process all records
Color Table 1:
ID | Item
1 | red
2 | blue
3 | green
Color Table 2:
ID | Item
1 | red
2 | blue
3 | green
4 | brown
Color Table 3:
ID | Item
1 | red
2 | blue
3 | green
4 | brown
Reply
Answers (
2
)
subQuery using Linq
Linq Output Value