public void SetPercentageDiscount(Percent percentOff) { var itemPercentageDiscountSetEvent = new ItemPercentageDiscountSetEvent { Id = Id, Version = CurrentVersion + 1, PercentOff = percentOff }; Apply(itemPercentageDiscountSetEvent, isNew: true); }
private void Apply(ItemPercentageDiscountSetEvent itemPercentageDiscountSetEvent, bool isNew = false) { base.AddEvent(itemPercentageDiscountSetEvent, isNew); PercentOff = itemPercentageDiscountSetEvent.PercentOff; }