public HomePageViewModel GetHomePageData() { var groups = _teamsRepository.FetchTeams().GroupBy(x => x.Group); var scorers = _teamsRepository.FetchScorers(); var vm = new HomePageViewModel() { Groups = groups.Select(g => new GroupViewModel() { GroupLetter = Convert.ToChar(g.Key), Teams = g.Select(t => new GroupTeamViewModel() { Flag = t.Flag, Games = t.Games, Name = t.Name, Points = t.Points }).OrderByDescending(x => x.Points).ToList() }).ToList(), Scorers = scorers.Select(x => new ScorersViewModel { Goals = x.Goals, FullName = x.FullName, PlayerId = x.RowKey, TeamId = x.TeamId }).ToList() }; return(vm); }