public ActionResult DeleteTypeChildOfParent(int idChild, int idParent) { bool result = true; int check = data.DeviceDevices.Where(x => x.TypeSymbolChildren == idChild & x.TypeSymbolParents == idParent & x.IsDeleted == false).Count(); if (check > 0) { result = false; } else { data.DeleteTypeParentTypeChild(idChild, idParent); result = true; } return(Json(result, JsonRequestBehavior.AllowGet)); }