Beispiel #1
0
        public async Task OnGetAsync(int pageIndex)
        {
            Paging = await _npcAppService.GetPaging(Keyword, pageIndex);

            var ids = Paging.Data.Select(x => x.Id).ToList();

            Scripts = await _npcAppService.GetScripts(ids);
        }
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"));
            }
        }