How to Get column item from ienumerable list
Solution:
IEnumerable<ListItem> lc = r.ToList();
var Items = (from p in lc
where (p["Issue_x0020_Type"].ToString().Trim()) == "Closed"
group p by DateTime.Parse(p["Create_x0020_Date"].ToString()).Month into g
select new { month = g.Key, count = g.Count() });
Here Create_x0020_Date is column name .
Solution:
IEnumerable<ListItem> lc = r.ToList();
var Items = (from p in lc
where (p["Issue_x0020_Type"].ToString().Trim()) == "Closed"
group p by DateTime.Parse(p["Create_x0020_Date"].ToString()).Month into g
select new { month = g.Key, count = g.Count() });
Here Create_x0020_Date is column name .
Comments
Post a Comment