I have a class.
public class Compaints
{
public string CustomerNumber{get; set;},
public string Complaint{get; set}
}
I have a list of complaints. I need to group by customerNumber and add it to dictionary say of type
Dictionary<string, int> – string will be customer number and int will be count.
How to do this in linq?
Thanks.
1 Answer