Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            genreOutputDto = await _genreService.Get(id);

            if (genreOutputDto == null)
            {
                return(RedirectToPage("/NotFound"));
            }

            return(Page());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var tempUserOutput = await _genreService.Get(id.Value);

            genreDetail = _mapper.Map <GenreOutPutDto>(tempUserOutput);

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