I have a table in my database.
`tblCustomers`
- CustomerId
- CustomerName
Now my need is to get all the customers grouped by CustomerName
but at least there should more than one occurrence of the customername
.
Like if there are 10 Customers with name = "ABC"
, get them into one array but 1 customer
with name = "XYZ"
(Only one record with this name) Don't get this.
This is what I was thinking
var query = (from c in entities.tblCustomers
group c.CustomerName into cust
//where cust.Key.Count >=2 (how to get this)
select ABC()
{
});