I am faced with the task of changing the management of stock, the actual source of the data from which we want to get information on how much product is available is going to be our separate database in Azure, it is the only place where we are supposed to take information about the quantity of products.
I am wondering how to approach this task, will my own implementation of the IInventoryService interface be sufficient here, in which I will make a request to Azure instead of querying the EpiCommerce tables?
It is possible to make and register your own implementation of IInventoryService. But:
Be aware that its method may be called many times. So consider the impact and maybe apply some caching in strategic places.
Consider whether you will be implementing the insert/update/delete methods, since they can be used from the Catalog UI.
Consider whether you will be adjusting the inventory in the external stock database. This is used a lot by InventoryRequester and IInventoryProcessor.AdjustInventoryOrRemoveLineItem.
I am faced with the task of changing the management of stock, the actual source of the data from which we want to get information on how much product is available is going to be our separate database in Azure, it is the only place where we are supposed to take information about the quantity of products.
I am wondering how to approach this task, will my own implementation of the IInventoryService interface be sufficient here, in which I will make a request to Azure instead of querying the EpiCommerce tables?