Service provider
Each service layer has its own interface that you can customize. These providers contain the service methods for interacting with the appropriate subsystem. All service providers must inherit from the ServiceProvider class and we recommend that you have a generics version of the class in which each service method is generics based.
Sample service method:
Generics extension method example:
If an existing service provider requires a new service method, consider extending the service provider and adding the new method instead of creating a new service provider. The following lists the various subsystems and their service providers:
-
Shopping Cart
Sitecore.Commerce.Services.Carts.CartServiceProvider -
Orders
Sitecore.Commerce.Services.Orders.OrderServiceProvider -
Pricing
Sitecore.Commerce.Services.Prices.PricingServiceProvider -
Product Synchronization
Sitecore.Commerce.Services.Products.ProductSynchronizationProvider -
Customers and Users
Sitecore.Commerce.Services.Customers.CustomerServiceProvider -
Inventory
Sitecore.Commerce.Services.Inventory.InventoryServiceProvider