public ActionResult Delete(ReadNewspaperVM readNewspaperVM) { try { _newspaperLogic.DeleteNewspaperById(readNewspaperVM.Id); return(RedirectToAction("Index", "PrintEdition")); } catch (Exception ex) { Logger.Error("Something goes wrong at Delet method at NewsppaerController " + ex.Message); return(View()); } }
public ActionResult Edit(int id) { ReadNewspaperVM readNewspaperVM = null; try { readNewspaperVM = _mapper.Map <ReadNewspaperVM>(_newspaperLogic.GetNewspaperById(id)); return(View(readNewspaperVM)); } catch (Exception ex) { Logger.Error("Something goes wrong at Edit method of NewspaperController: " + ex.Message); return(RedirectToAction("Index", "PrintEdition")); } }
public ActionResult Delete(int id) { ReadNewspaperVM readNewspaperVM = null; try { readNewspaperVM = _mapper.Map <ReadNewspaperVM>(_newspaperLogic.GetNewspaperById(id)); return(View(readNewspaperVM)); } catch (Exception ex) { Logger.Error(ex.Message); return(View("Index", "PrintEdition")); } }