// GET: MailServices public ActionResult Index() { ICollection <MailService> mailServices = _mailServiceManager.GetAll(); IEnumerable <MailServiceViewModel> mailServiceViewModels = Mapper.Map <IEnumerable <MailServiceViewModel> >(mailServices); return(View(mailServiceViewModels)); }
// GET: MailServices public ActionResult Index() { try { ICollection <MailService> mailServices = _mailServiceManager.GetAll(); IEnumerable <MailServiceViewModel> mailServiceViewModels = Mapper.Map <IEnumerable <MailServiceViewModel> >(mailServices); return(View(mailServiceViewModels)); } catch (Exception ex) { ExceptionMessage(ex); return(View("Error", new HandleErrorInfo(ex, "MailServices", "Index"))); } }