public IActionResult Index() { var world = _dbContext.Worlds.First(); var users = _dbContext.Users.Include(x => x.Villages).Include(x => x.Tribe) .Where(x => x.WorldId == world.Id).ToList(); var vm = new RankingOverviewViewModel() { Players = _mapper.Map <List <User>, List <UserRankViewModel> >(users), }; return(View(vm)); }
private void RecreateViewModels() { Jam = new JamOverviewViewModel(Model.Jam); Ranking = new RankingOverviewViewModel(Model.Ranking); }