public ActionResult DeleteConfirmed(int id) { var model = mapper.Map <DeleteAuthorViewModel>(authorLogic.GetById(id)); try { if (authorLogic.Delete(id)) { return(RedirectToAction("Index")); } return(View(model)); } catch { return(View(model)); } }
public bool DeleteAuthor(int id) { return(authors.Delete(id)); }