I’m using EF and LINQ.
I have the following in my db table
branchId Name ItemId CategoryId
2 Test1 1 1
5 Test1 1 1
3 Test1 1 2
2 Test2 2 1
7 Test2 2 1
I need to group by ItemId and BranchId should be ignored, so the output should be
Name ItemId CategoryId
Test1 1 1
Test1 1 2
Test2 2 2
Please help. thanks
You need to apply group by which is on multiple column, so for that you need to go for code like as below which do group by on multiple columns….