3 Answer(s)
-
0
Can you provide some simulated data?
This way I can debug it. :)
-
0
Let me just try and explain. Create an entity call it 'Policy', create another entity call it 'PolicyStatuses'.
PolicyStatuses
- Create
- Active
- Pending Approval
Now you have 20 Policies, each policy has a status ie see below
Now I want to return a List<Policies> grouping statuses and returning the counter StatusName NumberOfOccurances Create 1 Active 3 Pending 2
-
1
First I think this problem has nothing to do with zero.
Can you provide simulation data like this? This way I can debug it. :)
https://www.tutorialsteacher.com/linq/linq-grouping-operator-groupby-tolookup https://stackoverflow.com/questions/7285714/linq-with-groupby-and-count https://stackoverflow.com/questions/38625965/linq-groupby-with-count