예제 #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            actorDLT = await _actorService.Get(id);

            if (actorDLT == null)
            {
                return(RedirectToPage("/NotFound"));
            }
            return(Page());
        }
예제 #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var actorOutput = await _actorService.Get(id.Value);

            actorDetail = mapper.Map <ActorOutputDto>(actorOutput);

            if (actorDetail == null)
            {
                return(NotFound());
            }
            return(Page());
        }