private void Delete(Entity channelEntity, Entity deletedEntity)
        {
            switch (deletedEntity.EntityType.Id)
            {
            case "Resource":
                Guid resourceGuid = EpiserverEntryIdentifier.EntityIdToGuid(deletedEntity.Id);
                _epiApi.DeleteResource(resourceGuid);

                break;

            case "Channel":
                _epiApi.DeleteCatalog(deletedEntity.Id);
                break;

            case "ChannelNode":
                _epiApi.DeleteCatalogNode(deletedEntity, channelEntity.Id);
                break;

            case "Item":
                if ((_config.ItemsToSkus && _config.UseThreeLevelsInCommerce) || !_config.ItemsToSkus)
                {
                    _epiApi.DeleteCatalogEntry(deletedEntity);
                }

                if (_config.ItemsToSkus)
                {
                    var entitiesToDelete = new List <string>();

                    List <XElement> skuElements = _catalogElementFactory.GenerateSkuItemElemetsFromItem(deletedEntity);

                    foreach (XElement sku in skuElements)
                    {
                        XElement skuCodElement = sku.Element("Code");
                        if (skuCodElement != null)
                        {
                            entitiesToDelete.Add(skuCodElement.Value);
                        }
                    }

                    _epiApi.DeleteSkus(entitiesToDelete);
                }

                break;

            default:
                _epiApi.DeleteCatalogEntry(deletedEntity);
                break;
            }
        }