private Tuple<List<basketItem>, basketActionResult> getBasketListByTblBasket(List<tbl_basket> list,bool isDeletedInclude)
        {
            productShared pc = new productShared(db);

            basketActionResult basketAction = basketActionResult.success;
            List<basketItem> helperList = new List<basketItem>();

            foreach (var item in list)
            {
                basketItem helperItem = new basketItem();
                var productItem = item.tbl_product;

                // delete Basket
                if (productItem == null || productItem.statu == false || productItem.isDeleted)
                {
                    deleteBasketById(item.basketId);
                    return new Tuple<List<basketItem>, basketActionResult>(null, basketActionResult.redirect);

                }

                if (item.quantity < 1)
                {
                    deleteBasketById(item.basketId);
                    return new Tuple<List<basketItem>, basketActionResult>(null, basketActionResult.redirect);
                }

                //option
                var optionList = pc.getOptionListByProductItem(productItem);
                if (optionList != null && optionList.Count > 0)
                {
                    // delete Basket
                    if (!pc.isProductOptionValid(optionList, item.optionList, isDeletedInclude))
                    {
                        deleteBasketById(item.basketId);
                        return new Tuple<List<basketItem>, basketActionResult>(null, basketActionResult.redirect);
                    }

                    // Renk Seçimi Metalik
                    helperItem.optionItemList = getBasketOptionListByOptionStr(optionList, item.optionList);
                    helperItem.optionCode = item.optionList;
                }

                // stock
                int stockCount = pc.getProductStockAvailableCount(item.productId, item.optionList);
                if (stockCount < 1)
                {
                    deleteBasketById(item.basketId);
                    return new Tuple<List<basketItem>, basketActionResult>(null, basketActionResult.redirect);
                }

                if (stockCount < item.quantity)
                {
                    helperItem.quantity = stockCount;
                    updateStockCount(item.basketId, stockCount);
                    basketAction = basketActionResult.stockAdjust;
                }
                else
                {
                    helperItem.quantity = item.quantity;
                }

                // name
                helperItem.description = productItem.name;

                // price
                helperItem.productPriceDec = pc.calcPriceProduct(productItem);
                helperItem.productTotalPriceDec = helperItem.productPriceDec * helperItem.quantity;

                // image
                var photoItem = pc.getProductGallery(productItem, "110", "74").Where(a => a.Item2 == item.optionList).FirstOrDefault();
                if (photoItem != null)
                {
                    helperItem.photo = photoItem.Item1;
                }

                // discount
                helperItem.discountCode = item.discountCode;

                // basketId
                helperItem.basketId = item.basketId;

                // productId
                helperItem.productId = item.productId;

                helperList.Add(helperItem);

            }

            return new Tuple<List<basketItem>, basketActionResult>(helperList, basketAction);
        }