public void DeleteContact(int AthleteID, int contactid) { if (AthleteID == 0) { return; } // existing athlete Athlete Athlete = getAthlete(AthleteID); if (Athlete == null) { return; } AContactDetail detail = Athlete.getAllContacts().Where(c => c.ID == contactid).First(); Athlete.removeContact(detail); }