예제 #1
0
        public IActionResult OnGet(int passwordId)
        {
            Password = passwordData.GetPasswordById(passwordId);

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

            return(Page());
        }
예제 #2
0
        public IActionResult OnGet(int? passwordId)
        {

            if (passwordId.HasValue)
            {
                Password = passwordData.GetPasswordById(passwordId.Value);
            }else
            {
                Password = new Password();
            }

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

            return Page();
        }