public List <AlphaIndex_NetworkManage> Generate(List <AMR_MST07> values, GetAlphaMehtod_NetworkManage extractName) { var data = from q in values where extractName(q) != null group q by extractName(q) into g orderby g.Key select new AlphaIndex_NetworkManage() { Index = g.Key, Count = g.Count() }; var res = data.ToList(); res.Insert(0, AlphaIndex_NetworkManage.All); return(res); }
public List<AlphaIndex_NetworkManage> Generate(List<AMR_MST07> values, GetAlphaMehtod_NetworkManage extractName) { var data = from q in values where extractName(q) != null group q by extractName(q) into g orderby g.Key select new AlphaIndex_NetworkManage() { Index = g.Key, Count = g.Count() }; var res = data.ToList(); res.Insert(0, AlphaIndex_NetworkManage.All); return res; }