public void Apply(SpeechDescriptionChangedEvent ev) { if (ev.AggregateId != Id) { throw new InvalidDomainEventException(ErrorCode.InvalidDomainEvent, $"Cannot apply event : Speech Id ({Id}) is not equals to AggregateId ({ev.AggregateId}) of the event , {nameof(SpeechDescriptionChangedEvent)}"); } _description = ev.Description; }
public void Apply(SpeechDescriptionChangedEvent ev) { Id = ev.AggregateId; Description = ev.Description; }