25 lines
517 B
C#
Raw Normal View History

2016-11-02 20:41:12 +01:00
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<BasketItem>();
}
public string Id;
public List<BasketItem> Items { get; set; }
public string BuyerId { get; set; }
public decimal Total()
{
return Items.Sum(x => x.UnitPrice * x.Quantity);
}
}
}