public static void RemoveAllSellsFromProductSell(this object productSells, SellDetailModel referenceSell)
        {
            var productSellsCollection = productSells.CheckType <ICollection <ProductSellsModel> >();
            var productSell            = productSellsCollection.FirstOrDefault(x => x.Product.ID == referenceSell.Product.ID && x.Discount == referenceSell.Discount);

            productSell.RemoveAllSells();
            productSellsCollection.Remove(productSell);
        }
        public static void RemoveSellFromProductSell(this object productSells, SellDetailModel sell)
        {
            var productSellsCollection = productSells.CheckType <ICollection <ProductSellsModel> >();
            var productSell            = productSellsCollection.FirstOrDefault(x => x.Product.ID == sell.Product.ID && x.Discount == sell.Discount);

            productSell.RemoveSell();

            if (productSell.IsEmpty)
            {
                productSellsCollection.Remove(productSell);
            }
        }
        public static void AddSellToProductSell(this object productSells, SellDetailModel sell)
        {
            var productSellsCollection = productSells.CheckType <ICollection <ProductSellsModel> >();
            var productSell            = productSellsCollection.FirstOrDefault(x => x.Product.ID == sell.Product.ID && x.Discount == sell.Discount);

            if (productSell is null)
            {
                productSellsCollection.Add(new(sell));
            }
            else
            {
                productSell.AddSell(sell);
            }
        }