using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Models { public class Basket { public Basket() { Items = new List(); } public string Id; public List Items { get; set; } public string BuyerId { get; set; } public decimal Total() { return Items.Sum(x => x.UnitPrice * x.Quantity); } } }