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