The following code works, but it's not a nice code. (low performance)

I have a dictionary with value and key.

First i go trough every webcodes who exist. Then i load all participants in a list (where webcode equals the actual webcode in the foreach). After that i add the data (parameter of the webcode and a count of participants to the dictionary).

```
        Guid compID = Guid.Parse(wID);
        ChartModel webcodes = new ChartModel();
        webcodes.Title = "Webcodes Statistics";
        webcodes.Data = new Dictionary<string, int>();

        var webcodesData = db.t_Webcode;

        foreach (var w in webcodesData)
        {
            var wData = db.t_Participant.Where(t => t.FK_Competition == compID && t.Webcode == w.Webcode);

            if (wData.Count() != 0)
                webcodes.Data.Add(w.Parameter, wData.Count());
        }

        ViewBag.Webcodes = webcodes;

```

TIA