public static List <Info_2> Analysis(List <SqlCodeGenDto> list, Dictionary <string, string> languages) { List <Info_2> result = new List <Info_2>(); var Languages = list.Select(q => q.Language).Distinct().ToList(); foreach (var Language in Languages) { Info_2 info = new Info_2(); info.Language = Language; info.LanguageName = languages[Language]; result.Add(info); var tempList = list.Where(q => q.Language == Language).ToList(); info.Items = Info_3.Analysis(tempList); } return(result); }
public static List <Info_1> Analysis(List <SqlCodeGenDto> list, Dictionary <string, string> languages) { List <Info_1> result = new List <Info_1>(); var tplTypes = list.Select(q => q.TplType).Distinct().ToList(); foreach (var tplType in tplTypes) { Info_1 info = new Info_1(); info.TplTypeId = tplType; if (info.TplTypeId == 1) { info.TplTypeName = "表模板"; } else if (info.TplTypeId == 2) { info.TplTypeName = "存储过程模板"; } result.Add(info); var tempList = list.Where(q => q.TplType == tplType).ToList(); info.Items = Info_2.Analysis(tempList, languages); } return(result); }