Hi,
Please note that EPiServer Commerce 7.5 (Assuming you're using this version) provides two interfaces related to prices:
- IPriceService, provides access to IPriceValue, should be used for read-only tasks or updating all the prices of a catalog entry.
- IPriceDetailService, provides access to IPriceDetailValue, should be used for CRUD tasks for individual price.
For IPriceService, we provide GetCatalogEntryPrices(IEnumerable<CatalogKey>) to get prices of multiple products at one. The default implemetation (PriceServiceDatabase) call only one to database, which should be very efficient.
Regards.
/Q
Hi,
I noticed that it is the IcontentRepository.GetChildren<T>(); that makes an individual query for each product. Is it possible to retrieve the children in a more efficient way? Im surprised that the GetChildren method doesn't retrieve the products in a smart way.
What is the most efficient way to retrieve prices for large amount of VariationContent. I need to display some things fi there are any variations with a price for a user in a certain category of variations.
I have tried different solutions using the Commerce interfaces and they all seem to create an SQL query for each of the products individually. This is highly inefficient. Is there any way to get the prices through the API with small amount of queries?