public ActionResult EditForm(int?id) { var obj = new SupportItem(); var listType = supportTypeRepository.GetListForTree <object>(); if (id.HasValue) { obj = supportRepository.GetItemById <SupportItem>(id.Value); } return(Json(new { data = obj, listType = listType }, JsonRequestBehavior.AllowGet)); }