private void SendMails() { IList <Performance> performances = administrationService.GetPerformancesByDay(CurrentDate); IList <Performance> toSend = new List <Performance>(); foreach (Performance p in this.GetAllActivePerformancesFromScreen()) { bool shouldAdd = true; foreach (Performance p2 in toSend) { if (p2.Artist.Id == p.Artist.Id) { shouldAdd = false; break; } } if (shouldAdd) { toSend.Add(p); } } // check old ones removed foreach (Performance p in performances) { bool found = false; foreach (Performance p2 in GetAllActivePerformancesFromScreen()) { if (p.Artist.Id == p2.Artist.Id) { found = true; } } if (!found) { toSend.Add(p); } } administrationService.SendMail(toSend, GetAllActivePerformancesFromScreen()); }