public override string ToString() { return($"Id = {Id} TransactionTime = {TransactionTime}{Environment.NewLine}" + $"TotalPrice = {TotalPrice}{Environment.NewLine}" + $"{string.Join<string>(Environment.NewLine, ShoppingItems.Select(s => s.ToString()))}"); }
private void ComputeTotalCost() { TotalCost = ShoppingItems.Select(item => item.Cost).Sum(); }