示例#1
0
        public IActionResult Details(int id)
        {
            var quest = _questsService.ById(id);

            if (quest == null)
            {
                return(Redirect(Quests_Root_Path));
            }

            return(View(quest));
        }
示例#2
0
        public async Task <IActionResult> RemoveQuest(NPCDetailsViewModel model)
        {
            var npc = _NPCsService.ById(model.Id);

            var quest = _questsService.ById(model.QuestId);

            if (quest == null || npc == null)
            {
                return(Redirect(NPCs_Root_Path));
            }

            await _NPCsService.RemoveQuest(npc, quest);

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