public void Apply(SpeechUrlChangedEvent 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(SpeechUrlChangedEvent)}"); } _url = ev.Url; }
public void Apply(SpeechUrlChangedEvent ev) { Id = ev.AggregateId; Url = ev.Url; }