Пример #1
0
        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);
        }
Пример #2
0
 public void Apply(DomainEvents.ChangeMailingAddress e)
 {
     MailingAddress = e.Address;
 }