public void SetAmountDiscount(decimal amountOff) { var itemAmountDiscountSetEvent = new ItemAmountDiscountSetEvent { Id = Id, Version = CurrentVersion + 1, AmountOff = amountOff }; Apply(itemAmountDiscountSetEvent, isNew: true); }
private void Apply(ItemAmountDiscountSetEvent itemAmountDiscountSetEvent, bool isNew = false) { base.AddEvent(itemAmountDiscountSetEvent, isNew); AmountOff = itemAmountDiscountSetEvent.AmountOff; }