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

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

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

            movieDetails = await movieService.Get(id.Value);

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