Example #1
0
        /// <summary>
        /// True if same criteria, judge, contestant and RunNO
        /// </summary>
        public bool RunEquals(RunJudging other)
        {
            bool equals = RunNo == other.RunNo;

            equals &= JudgeId == other.JudgeId;
            equals &= CriterionId == other.CriterionId;
            equals &= RoundContestantId == other.RoundContestantId;
            return(equals);
        }
Example #2
0
        // TODO: Remove. Not in use?
        public static void Replace(this ICollection <RunJudging> runJudgings, RunJudging judging)
        {
            var existing = runJudgings.FirstOrDefault(p => p.RunEquals(judging));

            if (existing != null)
            {
                runJudgings.Remove(existing);
            }
            runJudgings.Add(judging);
        }
Example #3
0
        public static void Replace(this IDbSet <RunJudging> runJudgings, RunJudging judging)
        {
            var existing = runJudgings.FirstOrDefault(p =>
                                                      p.RunNo == judging.RunNo &&
                                                      p.JudgeId == judging.JudgeId &&
                                                      p.CriterionId == judging.CriterionId &&
                                                      p.RoundContestantId == judging.RoundContestantId);

            if (existing != null)
            {
                runJudgings.Remove(existing);
            }
            runJudgings.Add(judging);
        }
 public void ReplaceRunJudging(RunJudging runJudging)
 {
     RunJudgings.Replace(runJudging);
 }