public void UpdateWorkItemLink(
            string sourceWorkItemId,
            string targetWorkItemId,
            int linkTypeId,
            string comment,
            bool isLocked)
        {
            CreateEmptyUpdateDoc();

            XmlElement xwi = UpdateDocument.CreateElement(UpdateWorkItemLinkElem);

            UpdateDocument.AppendChild(xwi);

            xwi.SetAttribute(WorkItemLinkSourceID, sourceWorkItemId);
            xwi.SetAttribute(WorkItemLinkTargetID, targetWorkItemId);
            xwi.SetAttribute(WorkItemLinkType, XmlConvert.ToString(linkTypeId));

            var autoMergeOption = XmlConvert.ToString(false);
            var lockOption      = XmlConvert.ToString(isLocked);

            xwi.SetAttribute(WorkItemLinkAutoMerge, autoMergeOption);

            xwi.SetAttribute(WorkItemLinkComment, comment);
            xwi.SetAttribute(WorkItemLinkLock, lockOption);
        }
        public void RemoveWorkItemLink(
            string sourceWorkItemId,
            string targetWorkItemId,
            int linkTypeId,
            string comment)
        {
            CreateEmptyUpdateDoc();

            XmlElement xwi = UpdateDocument.CreateElement(DeleteWorkItemLinkElem);

            UpdateDocument.AppendChild(xwi);

            xwi.SetAttribute(WorkItemLinkSourceID, sourceWorkItemId);
            xwi.SetAttribute(WorkItemLinkTargetID, targetWorkItemId);
            xwi.SetAttribute(WorkItemLinkType, XmlConvert.ToString(linkTypeId));

            var autoMergeOption = XmlConvert.ToString(true);

            xwi.SetAttribute(WorkItemLinkAutoMerge, autoMergeOption);
        }