Exemplo n.º 1
0
        public bool Delete(int raceId)
        {
            var race  = repo.GetById(raceId);
            var teams = teamRepo.GetAllByRaceEventId(raceId);

            foreach (var team in teams)
            {
                team.RaceEventId = null;
            }

            repo.Delete(race);

            return(repo.SaveChanges());
        }
Exemplo n.º 2
0
 public IEnumerable <Team> GetAllByRaceEventId(int raceEventId)
 {
     return(repo.GetAllByRaceEventId(raceEventId));
 }