/// <summary> /// Verifies products existence in CRT. /// </summary> /// <param name="catalogId">The catalog ID.</param> /// <param name="ids">ProductExistence IDs.</param> /// <returns>ProductExistence IDs found in CRT.</returns> /// <remarks>This method can be used to figure out which products should be removed from the target channel if they no longer exist in CRT.</remarks> internal ReadOnlyCollection <ProductExistenceId> VerifyProductExistence(long catalogId, IEnumerable <ProductExistenceId> ids) { ProductExistenceCriteria criteria = new ProductExistenceCriteria { ChannelId = this.onlineChannel.RecordId, CatalogId = catalogId, Ids = ids }; ProductManager manager = ProductManager.Create(this.runtime); ReadOnlyCollection <ProductExistenceId> crtIds = manager.VerifyProductExistence(criteria, QueryResultSettings.AllRecords).Results; return(crtIds); }
public Task <PagedResult <ProductExistenceId> > VerifyExistence(ProductExistenceCriteria searchCriteria, QueryResultSettings settings) { return(Task.Run(() => Runtime.Client.ProductManager.Create(CommerceRuntimeManager.Runtime).VerifyProductExistence(searchCriteria, settings))); }