Basket : Improve, reduce, remove duplication call to database (#610)

This commit is contained in:
Cédric Michel
2021-11-01 22:09:34 +01:00
committed by GitHub
parent 47f69eb294
commit 984740d422
9 changed files with 76 additions and 79 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
@@ -6,8 +7,8 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
public interface IBasketService
{
Task TransferBasketAsync(string anonymousId, string userName);
Task AddItemToBasket(int basketId, int catalogItemId, decimal price, int quantity = 1);
Task SetQuantities(int basketId, Dictionary<string, int> quantities);
Task<Basket> AddItemToBasket(string username, int catalogItemId, decimal price, int quantity = 1);
Task<Basket> SetQuantities(int basketId, Dictionary<string, int> quantities);
Task DeleteBasketAsync(int basketId);
}
}