Code: Select all
dataContext.Table
.GroupBy(x => x.StringValue.Substring(0, 1))
.Select(x => new { StringText= x.Key,
Count = x.Count(y => y.SomeFlag == true) });
Code: Select all
dataContext.Table
.GroupBy(x => x.StringValue.Substring(0, 1))
.Select(x => new { StringText= x.Key,
Count = x.Count(y => y.SomeFlag == true) });