Exemple #1
0
        private void AddProductToBasket(Guid basketId, ProductData product)
        {
            var basket = _basketRepository.GetFirstOrDefault(z => z.Id == basketId);

            if (basket == null)
            {
                return;
            }
            basket.Total = basket.Total + product.Count * product.Price;
            _basketRepository.UpdateBasket(basket);
        }