public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } await _adminService.AddAdminUserAsync(new AdminUser(Id, FirstName, LastName, "admin", Email, passwordHasher.HashPassword(null, Password))); return(RedirectToPage("/Index")); }