public async Task <ApiResultDTO <CustomerBasketDTO> > AddItemToBasket(BasketItemDTO basketItemDTO)
        {
            var saveItem = new ApiResultDTO <CustomerBasketDTO> {
                Result = new CustomerBasketDTO()
            };

            #region stock control

            var isProductStockExist =
                _basketService.CheckProductStock(new CheckProductStockDTO
            {
                ProductId = basketItemDTO.ProductId,
                Quantity  = basketItemDTO.Quantity
            });

            if (!isProductStockExist)
            {
                //If product is not enough or not exist
                saveItem.ResultType = DTO.ResultType.NotFound;
                saveItem.Message    = "Not enough product";
                return(saveItem);
            }

            #endregion

            var existBasketItems = await GetBasketAsync(basketItemDTO.CustomerId);

            //if there is not basket in Redis
            if (existBasketItems != null &&
                existBasketItems.BasketItems != null &&
                existBasketItems.BasketItems.Any())
            {
                //if same product added to card then it will sum existing and new quantity
                if (existBasketItems.BasketItems.Any(x => x.ProductId == basketItemDTO.ProductId))
                {
                    var existingProduct = existBasketItems
                                          .BasketItems.First(x => x.ProductId == basketItemDTO.ProductId);

                    existingProduct.Quantity += basketItemDTO.Quantity;
                }
                else
                {
                    existBasketItems.BasketItems.Add(basketItemDTO);
                }

                saveItem.Result  = existBasketItems;
                saveItem.Message = "Item successfully added.";
            }
            else
            {
                saveItem.Result.CustomerId = basketItemDTO.CustomerId;
                saveItem.Result.BasketItems.Add(basketItemDTO);
                saveItem.Message = "Item successfully added.";
            }

            saveItem.Result = await UpdateBasketAsync(saveItem.Result);

            return(saveItem);
        }