List<object> , LINQ. , , .
LINQ, :
return _context.Visitas.Where(a => a.CicloId == id)
.GroupBy(a => a.Estado)
.Select(n => new { Text = n.Key.Descripcion , Value = n.Count() }).ToList();
, , , a List<yourAnonymousType> List<object>. , :
return _context.Visitas.Where(a => a.CicloId == id)
.GroupBy(a => a.Estado)
.Select(n => new { Text = n.Key.Descripcion , Value = n.Count() })
.Cast<object>().ToList();
, YourDataType Text Value. List<YourDataType>.