Example #1
0
        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));
            }
        }
Example #2
0
 public bool DeleteAuthor(int id)
 {
     return(authors.Delete(id));
 }