namespace WebVentaCoche.Models
{
    public class Cart
    {
        public int Id { get; set; }

        public string? UserId { get; set; }

        public List<Product> Products { get; set; } = new List<Product>();

        public decimal Total
        {
            get
            {
                return Products.Sum(p => p.Price);
            }
        }
    }
}
