public JsonResult RelateNodePost(RelateNodeModel model) { try { _nodeAction.RelateNode(model); } catch (Exception exception) { return new NewtonsoftJsonResult() { Data = new { status = "failure", message = exception.Message } }; } return new NewtonsoftJsonResult() { Data = new { status = "success" } }; }
public void RelateNode(RelateNodeModel model) { var node = _nodeRepository.Find(model.NodeId); node.OuterCategoryId = model.ArticleCategoryId; _nodeRepository.Save(node); }