public bool CanApply(DomainEvents.ChangeMailingAddress @event) { if (@event.Address == null) { throw new DomainValidationException("Address not provided to Change Mailing Address."); } else if (string.IsNullOrWhiteSpace(@event.Address.Street)) { throw new DomainValidationException("Street Address not provided to Change Mailing Address."); } return(true); }
public void Apply(DomainEvents.ChangeMailingAddress e) { MailingAddress = e.Address; }