Exemplo n.º 1
0
        private decimal CalculateValueOfProducts(IList <Product> products)
        {
            var totalBeforeOffers = products.Sum(product => product.Quantity * product.PriceInPounds);
            var totalAfterOffers  = totalBeforeOffers - _offerService.ApplyOffers(products);

            return(totalAfterOffers);
        }