Database Service
A service which handles storing of the Basket in the database
The database service is what handles the insertion, updating, and clearing of the UmbCheckout Basket within the database. Clearing a Basket also deletes its stored copy.
You can access the database service by injecting IDatabaseService which can be found within the namespace UmbCheckout.Core.Addons.Interfaces
Every method also has an overload that takes a CancellationToken as its last parameter (see Cancellation Tokens). UpdateBasket(sessionId, basket), DeleteBasket(sessionId, siteRootCulture, currencyCode) and DeleteBaskets(expiryDateTime) without a token are [Obsolete], scheduled for removal in 17.1.
UpdateBasket
Updates the stored Basket
Parameters:
Task<Basket> UpdateBasket(string sessionId, Basket basket);DeleteBasket
Deleted the stored Basket
Parameters:
sessionId
The session to delete the Basket for
Task DeleteBasket(string sessionId);DeleteBaskets
Deleted all of the stored Baskets older than the specified days
Parameters:
expiryDateTime
The days to delete from
Last updated