Hi,
I got a bit stuck in trying to perfom an action per each item on a list.
I'm filling in the list with:
- HyperlinksDAL hl = new HyperlinksDAL();
- hl.GetAll();
HyperlinksDAL:
- public List<Hyperlink> GetAll()
- {
- using (var context = new servicesEntities())
- {
- return context.Hyperlinks.ToList();
- }
- }
And I figured I could use a foreach to then fill in a series for a chart like:
- foreach(var i in list)
- {
- series.DataPoints.Add(new CategoricalDataPoint(500, "jan"));
- }
Regards.