public ActionResult CadastrarContatos(ListaContatosViewModel Itens) { try { Itens.Status = true; AgendaContatosService.Add(Itens.ToDomain()); return(RedirectToAction("Index", "Home")); } catch (Exception ex) { return(RedirectToAction("Index", "Home")); } }
public ActionResult EditarContatos(ListaContatosViewModel Itens) { try { Itens.Status = true; AgendaContatosService.Update(Itens.ToDomain()); return(RedirectToAction("Index", "Home")); } catch { return(RedirectToAction("Index", "Home")); } }