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