public async Task <IActionResult> OnPost() { if (ModelState.IsValid == false) { return(Page()); } await _data.UpdatePerson(UpdatePerson.Id, UpdatePerson.FirstName); return(RedirectToPage("./All")); }
public async Task <IActionResult> Put(UpdatePersonModel data) { if (data.Id == 0) { return(BadRequest()); } await _data.UpdatePerson(data.Id, data.FirstName); return(Ok()); }
public async Task <IActionResult> Edit(UpdatePersonModel person) { await _data.UpdatePerson(person.Id, person.FirstName); return(RedirectToAction("Index")); }