Beispiel #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            if (id > 0)
            {
                var npc = await _npcAppService.Get(id);

                if (npc == null)
                {
                    ErrorMessage = $"Npc {id} 不存在!";
                    return(Page());
                }
                Npc = _mapper.Map <NpcInput>(npc);
            }

            return(Page());
        }
Beispiel #2
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            if (id > 0)
            {
                var npc = await _npcAppService.Get(id);

                Npc = _mapper.Map <NpcInput>(npc);

                Scripts = await _npcAppService.GetScripts(id);

                return(Page());
            }
            else
            {
                return(RedirectToPage("/Npc/Index"));
            }
        }
Beispiel #3
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            if (id > 0)
            {
                Npc = await _npcAppService.Get(id);

                if (Npc == null)
                {
                    ErrorMessage = $"Npc {id} 不存在!";
                    return(Page());
                }
                return(Page());
            }
            else
            {
                return(RedirectToPage("/Npc/Index"));
            }
        }