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
Rahul Singh
NA
1.4k
584.3k
C# LINQ
Oct 29 2014 2:55 AM
I know its easy to group objects by two properties but I was wondering is it possible to Group by either of two properties? Probably below example will make it more clear:-
Suppose I have this table:-
Now, i want to group this data either if CategoryIds are same or Fruits are same.
Sample Output:-
Group
1
:-
1
Apple
1
Grapes
Group
2
:-
2
Tablet
2
Laptop
Group
3
:-
5
Coke
6
Coke
CategoryID
Fruits
1
Apple
1
Grapes
2
Tablet
2
Laptop
5
Coke
6
Coke
Reply
Answers (
7
)
Entity Framework
Linq Update Query