Esempio n. 1
0
        public bool CanApply(DomainEvents.CreateCustomer @event)
        {
            if (@event.MailingAddress == null)
            {
                throw new DomainValidationException("Mailing Address not provided to Create Customer.");
            }
            else if (@event.PrimaryAccountHolder == null)
            {
                throw new DomainValidationException("Primary Account Holder not provided to Create Customer.");
            }

            return(true);
        }
Esempio n. 2
0
 public void Apply(DomainEvents.CreateCustomer e)
 {
     PrimaryAccountHolder = e.PrimaryAccountHolder;
     MailingAddress       = e.MailingAddress;
 }