示例#1
0
 public void AddItem(Guid productId, int quantity, double price)
 {
     var cartItem = new CartItem
     {
         UserId = _userService.GetCurrentUserId(),
         ProductId = productId,
         Quantity = quantity,
         UnitPrice = price
     };
     _entityContext.Insert(cartItem);
 }
示例#2
0
 public CartItemViewModel(CartItem cartItem, Product product)
 {
     _cartItem = cartItem;
     Product = product;
 }