private void DeleteResource(Entity targetEntity, Entity parentEnt, string channelIdentifier, string folderDateTime, string resourceZipFile) { var resource = new Resources(_context); XDocument doc = resource.HandleResourceUnlink(targetEntity, parentEnt, DeleteUtilConfig); DocumentFileHelper.ZipDocumentAndUploadToAzure(XmlDocumentType.Resources, doc, DeleteUtilConfig, folderDateTime /*, _context*/); if (DeleteUtilConfig.ActivePublicationMode.Equals(PublicationMode.Automatic)) { _context.Log(LogLevel.Debug, "Starting automatic import!"); if (_epiApi.StartAssetImportIntoEpiServerCommerce( DeleteUtilConfig.ResourceNameInCloud, /*Path.Combine(this.DeleteUtilConfig.ResourcesRootPath, folderDateTime, "Resources.xml")*/ Path.Combine(DeleteUtilConfig.ResourcesRootPath, folderDateTime), DeleteUtilConfig)) { _epiApi.SendHttpPost(DeleteUtilConfig, Path.Combine(DeleteUtilConfig.ResourcesRootPath, folderDateTime, resourceZipFile)); } } }