-
-
Save dcomartin/b5967107de977cfc1047c34d163aba7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShoppingCart | |
{ | |
public ShoppingCart(Guid shoppingCartId, Guid customerId) | |
{ | |
ShoppingCartId = shoppingCartId; | |
CustomerId = customerId; | |
} | |
public Guid ShoppingCartId { get; private set; } | |
public Guid CustomerId { get; private set; } | |
public IList<ShoppingCartItem> Items { get; set; } = new List<ShoppingCartItem>(); | |
} | |
public class ShoppingCartItem | |
{ | |
public ShoppingCartItem(Guid shoppingCartId, Guid productId, int quantity, decimal price) | |
{ | |
ShoppingCartId = shoppingCartId; | |
ProductId = productId; | |
Quantity = quantity; | |
Price = price; | |
} | |
public Guid ShoppingCartId { get; set; } | |
public Guid ProductId { get; private set; } | |
public int Quantity { get; set; } | |
public decimal Price { get; private set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment