Ejemplo n.º 1
0
        public decimal BasketTotal()
        {
            decimal basketTotal = 0;

            if (BasketItems != null)
            {
                basketTotal += BasketItems.Sum(basketItem => basketItem.Quantity * basketItem.Product.Price);
            }
            return(basketTotal);
        }
Ejemplo n.º 2
0
 public decimal GetTotalPrice()
 {
     return(BasketItems.Sum(o => o.GetTotalPrice()));
 }
Ejemplo n.º 3
0
 public decimal TotalPrice() => BasketItems.Sum(x => x.Price * x.Quantity);
 public decimal Total()
 {
     return(Math.Round(BasketItems.Sum(x => x.UnitPrice * x.Quantity), 2));
 }