Beispiel #1
0
        public void SetPercentageDiscount(Percent percentOff)
        {
            var itemPercentageDiscountSetEvent = new ItemPercentageDiscountSetEvent
            {
                Id         = Id,
                Version    = CurrentVersion + 1,
                PercentOff = percentOff
            };

            Apply(itemPercentageDiscountSetEvent, isNew: true);
        }
Beispiel #2
0
        private void Apply(ItemPercentageDiscountSetEvent itemPercentageDiscountSetEvent, bool isNew = false)
        {
            base.AddEvent(itemPercentageDiscountSetEvent, isNew);

            PercentOff = itemPercentageDiscountSetEvent.PercentOff;
        }