Beispiel #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            genreMovieDLT = await _genreMovieService.Get(id);

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

            return(Page());
        }
Beispiel #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var genreMovie = await _genreMovieService.Get(id.Value);

            gmDetail = _mapper.Map <GenreMovieOutput>(genreMovie);

            if (gmDetail == null)
            {
                return(NotFound());
            }
            return(Page());
        }
 public async Task <GenreMovieOutput> Get(int id)
 {
     return(await GenreMovieService.Get(id));
 }