public ActionResult Create(ProductAttributeDto dto) { string secondParentId = Request["SecondParentId"]; string thirdParentId = Request["ThirdParentId"]; if (!string.IsNullOrEmpty(secondParentId)) { dto.ParentId = int.Parse(secondParentId); } if (!string.IsNullOrEmpty(thirdParentId)) { dto.ParentId = int.Parse(thirdParentId); } var result = _productattributeContract.Insert(dto); return(Json(result, JsonRequestBehavior.AllowGet)); }