Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
7
Reply
C# LINQ
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Rahul Singh
9y
1k
1
Reply
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
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
Entity Framework
Linq Update Query