public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } var user = await _context.GetAppUserAsync(Username); if (user == null) { return(NotFound($"Unable to load user with ID '{Username}'.")); } var mentor = user.Mentor; if (mentor == null) { return(Redirect("/Error")); } await _context.AddMentorAboutAsync(mentor, Input.About); return(Redirect("./Address")); }
public async Task <IActionResult> OnGetAsync() { var user = await _context.GetAppUserAsync(Username); this.UserType = this.PopulateUserType(user); return(Page()); }