public void RemoveAllRows()
 {
     ScoredResultRows?.Clear();
     RacePoints    = 0;
     BonusPoints   = 0;
     PenaltyPoints = 0;
     TotalPoints   = 0;
 }
        public ScoredTeamResultRowEntity AddRows(IEnumerable <ScoredResultRowEntity> resultRows)
        {
            if (ScoredResultRows == null)
            {
                ScoredResultRows = new List <ScoredResultRowEntity>();
            }
            foreach (var resultRow in resultRows)
            {
                ScoredResultRows.Add(resultRow);
                RacePoints    += resultRow.RacePoints;
                BonusPoints   += resultRow.BonusPoints;
                PenaltyPoints += resultRow.PenaltyPoints;
                TotalPoints   += resultRow.TotalPoints;
            }

            return(this);
        }
        public override void Delete(LeagueDbContext dbContext)
        {
            ScoredResultRows?.ToList().ForEach(x => x.Delete(dbContext));

            base.Delete(dbContext);
        }