示例#1
0
        public void RemoveEvent(int compId, int eventId)
        {
            CompetitionEvents eventToRemove = CompetitionEvents.Where(e => e.CompetitionId == compId && e.EventId == eventId).Single();

            CompetitionEvents.Remove(eventToRemove);
            SaveChanges();
        }
        public override bool Equals(object obj)
        {
            CompetitionEvents competitionEvents = (CompetitionEvents)obj;

            if (competitionEvents.CompetitionId == CompetitionId && competitionEvents.EventId == EventId)
            {
                return(true);
            }
            return(false);
        }