public ActionResult Edit(AuthorVM.Author author, string submit) { if (submit == "Cancel") { return(RedirectToAction("Index")); } if (!ModelState.IsValid) { return(View(author)); } adm.Update(author); return(RedirectToAction("Index")); }
public IActionResult OnGet(int id) { Author = _authorDm.Find(id); return(Page()); }
public IActionResult OnGet() { Author = _authorDm.Add(); return(Page()); }