Esempio n. 1
0
        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());
 }
Esempio n. 3
0
 public IActionResult OnGet()
 {
     Author = _authorDm.Add();
     return(Page());
 }