public void Execute(CompetitionBizDto dto)
        {
            dto.GroupPhase = dto.SelectedMovies
                             .OrderBy(m => m.PrimaryTitle)
                             .Select((x, i) => new { Index = i, Value = x })
                             .GroupBy(x => x.Index / AmountGroupMovies)
                             .Select(x => x.Select(v => v.Value).ToList())
                             .Select((x, i) => new GroupDto {
                Name = $"Grupo {(i+1).ToSequenceChar()}", Movies = x
            })
                             .ToList();

            dto.QuarterFinals = _phase.Dispute(dto.GroupPhase);
        }
示例#2
0
 public void Execute(CompetitionBizDto dto)
 {
     dto.SemiFinals = _phase.Dispute(dto.QuarterFinals);
     dto.Finals     = _phase.Dispute(dto.SemiFinals).First();
 }