public async Task <IActionResult> OnPostSavePerson() { if (Person == null) { await _context.AddAsync(Person); } else { _context.Update(Person); } await _context.SaveChangesAsync(); return(RedirectToPage("Person")); }