using Bookstore.Domain.Books; namespace Bookstore.Domain.Carts { public class ShoppingCartItem : Entity { // An empty constructor is required by EF Core private ShoppingCartItem() { } public ShoppingCartItem(ShoppingCart shoppingCart, int bookId, int quantity, bool wantToBuy) { ShoppingCartId = shoppingCart.Id; ShoppingCart = shoppingCart; BookId = bookId; Quantity = quantity; WantToBuy = wantToBuy; } public int ShoppingCartId { get; set; } public ShoppingCart ShoppingCart { get; set; } public int BookId { get; set; } public Book Book { get; set; } public int Quantity { get; set; } public bool WantToBuy { get; set; } } }