public ActionResult Edit(AuthorViewModel model) { var author = mapper.Map <AuthorViewModel, Author>(model); try { if (ModelState.IsValid) { if (authorLogic.Edit(author)) { return(RedirectToAction("Index")); } } return(View(model)); } catch { return(View(model)); } }
public bool PutAuthor(Author author) { return(authors.Edit(author)); }