public async Task <IActionResult> OnGetAsync(int id) { genreOutputDto = await _genreService.Get(id); if (genreOutputDto == null) { return(RedirectToPage("/NotFound")); } return(Page()); }
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()); }