Ejemplo n.º 1
0
        public override void Delete(int id)
        {
            var performanceRepo = new PerformanceRepo();

            var contestant = Get(id);

            performanceRepo.Delete(contestant.Performance.Id);

            base.Delete(id);
        }
Ejemplo n.º 2
0
        protected override Contestant GetItemFromDataReader(IDataReader reader)
        {
            int         id                   = Convert.ToInt32(reader.GetColumnValue(ID));
            int         performanceId        = Convert.ToInt32(reader.GetColumnValue(PERFORMANCEID));
            double?     ruleViolationPenalty = reader.GetColumnValue(RULE_VIOLATION_PENALTY) as double?;
            double?     tieBreakerPoints     = reader.GetColumnValue(TIE_BREAKER_POINTS) as double?;
            Performance performance          = new PerformanceRepo().Get(performanceId);

            return(new Contestant(id, performance, ruleViolationPenalty ?? 0, tieBreakerPoints ?? 0));
        }