I'm new in LINQ, I have the following LINQ:
var number_ofCPtype = (from DataRow s in resultFaultCrewprCurrent[1].AsEnumerable()
group s by s.Field<string>("cp_type") into g
select new
{
mm = g.Key ,
list = g.Count()
}).ToList();
I want to add extra field call it (color),and have the following conditions:
if (g.key=="Stiven")
color ="blue"
if(g.key=="Alex")
color ="red"
if(g.key=="Jack")
color ="green"