public ProviderPrincipal(ProviderPrincipal principal)
            : base()
        {
            // create members
            this.Address = new Address();

            // update
            Update(principal);
        }
        public void Update(ProviderPrincipal principal)
        {
            // update all values
            this.Name = principal.Name.Scrub();

            // update the address
            this.Address.Update(principal.Address);

            // update the phone
            this.Phone = principal.Phone.Scrub();

            //update the email
            this.Email = principal.Email.Scrub();
        }
        public bool HasChanged(ProviderPrincipal principal)
        {
            if (this.Address.HasChanged(principal.Address))
            {
                return(true);
            }

            if (this.Name != principal.Name.Scrub())
            {
                return(true);
            }

            if (this.Phone != principal.Phone.Scrub())
            {
                return(true);
            }

            if (this.Email != principal.Email.Scrub())
            {
                return(true);
            }

            return(false);
        }