Skip to Main Content
Customer Feedback

We love feedback from you on our products and the problems in your daily work that you would like us to solve. Please describe the challenge you're encountering and your desired outcome. Be as detailed as possible.

For technical issues or bugs please head to Support or our Developer Community. You can assign up to 20 votes in total. Thank you for your feedback.

Status explanation: 'Future Consideration' = Continuing to collect further feedback, not planned at this time. 'Investigating' = Prioritized for deeper customer and feasibility investigations ahead of planning development.

Categories Technical
Created by Guest
Created on Apr 17, 2023

Product Engineering team - improvement suggestion - readonly API calls

This is a suggestion for the Configured Commerce (B2B) Product Engineering team.

For the V2 Services that inherit from ServiceV2Base (Such as the V2 Product Service) we can improve performance for scenarios where we only read data but are not expected to update anything.

As things stand currently, in ServiceV2Base we begin a transaction (if not already active) and all subsequent activity in the handler chain is carried out as part of a transaction. Then changes are saved and the transaction closed.

The Handler chain may take a long time to execute especially if calls to external 3rd Party services are involved. This would cause the transaction to remain open for a long time and not serve any real benefit for a read-only scenario.

Another problem is that for a use case that is expected to only read data, a developer may inadvertently update data.

We can avoid these issues for read-only scenarios by including an optional parameter on the ExecuteHandlerChain implementation.

*** For the following discussion, I am not able to attach the .CS or .ZIP files here due to attachment restrictions. Please indicate how I can send the attachment ***

I have attached a suggestion for implementing the same (Note: Due to the large overall size of the solution, it does not compline on my development machine. I do not guarantee the suggested changes and should be merely treated as inputs). All changes are marked with "RK changes start" and "RK changes end".

The files changed are: ServiceV2Base, IUnitOfWork, UnitOfWork, IDataProvider and EntityFrameworkDataProvider.

However, if we chose to simply ignore the changes instead of throwing an exception (not a robust implementation), we will only need to change ServiceV2Base.