示例#1
0
        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));
        }
示例#2
0
 private void RecreateViewModels()
 {
     Jam     = new JamOverviewViewModel(Model.Jam);
     Ranking = new RankingOverviewViewModel(Model.Ranking);
 }