public IActionResult Details(int id)
        {
            var dungeon = _dungeonsService.ById(id);

            if (dungeon == null)
            {
                return(Redirect(Dungeons_Root_Path));
            }

            var viewModel = new DungeonDetailsViewModel
            {
                Id     = dungeon.Id,
                Name   = dungeon.Name,
                Bosses = dungeon.Bosses.Select(x => new NPCsAllViewModel {
                    Id = x.Id, Name = x.Name
                }).ToList(),
                ItemRewards = dungeon.Rewards.Select(x => new ItemsAllViewModel {
                    Id = x.Id, Name = x.Name
                }).ToList()
            };

            viewModel.AchievementRewardName = _achievementsService.ById(dungeon.AchievementRewardId)?.Name;
            viewModel.AchievementRewardId   = _achievementsService.ById(dungeon.AchievementRewardId)?.Id;

            return(View(viewModel));
        }
        public async Task <IActionResult> RemoveItem(DungeonDetailsViewModel model)
        {
            var dungeon = _dungeonsService.ById(model.Id);

            var item = _itemsService.ById(model.ItemId);

            if (item == null || dungeon == null)
            {
                return(Redirect(Dungeons_Root_Path));
            }

            await _dungeonsService.RemoveItem(dungeon, item);

            return(RedirectToAction("Details", new { id = dungeon.Id }));
        }
        public async Task <IActionResult> RemoveBoss(DungeonDetailsViewModel model)
        {
            var dungeon = _dungeonsService.ById(model.Id);

            var boss = _NPCsService.ById(model.BossId);

            if (boss == null || dungeon == null)
            {
                return(Redirect(Dungeons_Root_Path));
            }

            await _dungeonsService.RemoveBoss(dungeon, boss);

            return(RedirectToAction("Details", new { id = dungeon.Id }));
        }