public void RemoveRaceDiscipline(RaceDiscipline raceDiscipline) { if (raceDiscipline != null) { foreach (RaceDiscipline rd in RaceDisciplines) { if (rd == raceDiscipline) { RaceDisciplines.Remove(rd); return; } } } }
public void AddRaceDiscipline(RaceDiscipline raceDiscipline) { if (raceDiscipline != null) { foreach (RaceDiscipline rd in RaceDisciplines) { if (rd.Name == raceDiscipline.Name) { return; } } RaceDisciplines.Add(raceDiscipline); } }