public JsonResult Get(int id) { var apiResult = TryExecute(() => { var contact = _crmContactRepository.Get(id, "ParentAccount,Person"); var contactVm = new CRMContactModel(contact); return(contactVm); }, "Contacts Fetched sucessfully"); return(Json(apiResult, JsonRequestBehavior.AllowGet)); }
public ActionResult Details(int id) { var crmContact = _crmContactRepository.Get(id); return(CheckForNullAndExecute(crmContact, () => View(crmContact))); }