public IEnumerable <Team> Create(int howMany) { var teams = new List <Team>(); using (var formationRepository = new RepositoryFactory().CreateFormationRepository()) { var formations = formationRepository.GetAll().ToList(); for (int i = 0; i < howMany; i++) { var team = new Team { Formation = _listRandomizer.GetItem(formations) }; teams.Add(team); } } return(teams); }
private PlayerProfile GetRandomPlayerProfile(IEnumerable <PlayerProfile> playerProfiles) { var randomPlayerProfile = ListRandomizer.GetItem(playerProfiles); return(randomPlayerProfile); }