예제 #1
0
        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));
        }
예제 #2
0
        public ActionResult Details(int id)
        {
            var crmContact = _crmContactRepository.Get(id);

            return(CheckForNullAndExecute(crmContact, () => View(crmContact)));
        }