private void DeleteResourceLink(Entity removedResource, Entity removalTarget)
        {
            var resourceGuid = EpiserverEntryIdentifier.EntityIdToGuid(removedResource.Id);
            var targetCode   = _catalogCodeGenerator.GetEpiserverCode(removalTarget);

            _epiApi.DeleteLink(resourceGuid, targetCode);
        }
        private void DeleteLink(Entity removalSource, Entity removalTarget, string linkTypeId, bool overrideIsRelation = false)
        {
            bool isRelation = _mappingHelper.IsRelation(linkTypeId) || overrideIsRelation;

            LinkType linktype = _config.LinkTypes.Find(lt => lt.Id == linkTypeId);

            if (linktype.SourceEntityTypeId.Equals("ChannelNode") && linktype.TargetEntityTypeId.Equals("Product"))
            {
                isRelation = true;
            }

            string sourceCode = _catalogCodeGenerator.GetEpiserverCode(removalSource);
            string targetCode = _catalogCodeGenerator.GetEpiserverCode(removalTarget);

            _epiApi.DeleteLink(sourceCode, targetCode, isRelation);
        }