示例#1
0
        public CartUpdateCommand(Guid id, CartItemViewModel item)
            : base(id)
        {
            Item = new CartCreateUpdateItem
            {
                Sku      = item.Sku,
                Quantity = item.Quantity
            };

            Validator = new CartUpdateCommandValidator(this);
        }
示例#2
0
        public CartCreateCommand(CartViewModel cart)
            : base(Comb.NewComb())
        {
            CustomerId = cart.CustomerId;
            Status     = DomainValues.Cart.Status.Pending;
            Item       = new CartCreateUpdateItem
            {
                Sku      = cart.Item.Sku,
                Quantity = cart.Item.Quantity
            };

            Validator = new CartCreateCommandValidator(this);
        }