Example #1
0
        public async Task <IActionResult> OnGet(int id)
        {
            director = await _directorService.Get(id);

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

            var directorOutput = await _directorService.Get(id.Value);
            directorDetail = mapper.Map<DirectorOutputDto>(directorOutput);

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