public ActionResult DeleteConfirmed(int id) { var autor = _autorApp.GetById(id); _autorApp.Remove(autor); return(RedirectToAction("Index")); }
public ActionResult Delete(int id, AutorViewModel autor) { if (ModelState.IsValid) { var _autorDomain = Mapper.Map <AutorViewModel, Autor>(autor); _autorAppService.Remove(_autorDomain); return(RedirectToAction("Index")); } return(View(autor)); }