I have a list of objects like this:
BonusesToApprove = new List<Bonus>();
I need to group it by id. I've tried several approaches like the suggestion here but the compiler returns message:
System.Collections.Generic.List<AdHoc.Objects.Bonus> does not contain a definition for 'GroupBy' ...
A sample of the code I've tried is:
var grouped = BonusesToApprove
.GroupBy ...
Can anyone tell me what I'm doing wrong?