public ScoringFiveJudgePanelViewModel(string performanceId, PerformanceScore score, IJudgePanel panel)
 {
     CompetitionId = performanceId.ExtractCompetitionId();
     PerformanceId = performanceId;
     Score = score;
     Panel = panel;
 }
        void Populate(CompetitionInfo info)
        {
            var performances =
                info.Registrations
                    .Select(x => x.GetPerformances(info.Competition))
                    .SelectMany(x => x)
                    .ToList();

            var panel = new FiveJudgePanel(new List<JudgeScore>());
            performances.ForEach(performance =>
            {
                var scores = panel.Judges.Select(judge => new JudgeScore(performance.Id, judge.Id)).ToList();
                var calculator = new FiveJudgePanelPerformanceScoreCalculator(scores);

                var score = new PerformanceScore {PerformanceId = performance.Id};
                var command = new MarkTeamScoringCompleteCommand
                {
                    PerformanceId = performance.Id,
                    RegistrationId = performance.RegistrationId,
                    DivisionId = performance.DivisionId,
                    CommandByUser = "******",
                    CommandWhen = DateTime.UtcNow
                };

                score.Update(calculator);
                score.Update(command);
                score.IsScoringComplete = false;

                scores.ForEach(RavenSession.Store);
                RavenSession.Store(score);
            });
        }