示例#1
0
        public static Person CreateClient(PersonInfo personInfo)
        {
            var person = new Person(personInfo.Id, personInfo.Gender, personInfo.BirthDate, personInfo.BirthDateEstimated);

            var personNames = PersonName.Create(personInfo);

            person.AddNames(personNames);

            var addresses = PersonAddress.Create(personInfo);

            person.AddAddresss(addresses);

            var contacts = PersonContact.Create(personInfo);

            person.AddContacts(contacts);

            return(person);
        }
示例#2
0
        public void UpdateClient(PersonInfo personInfo)
        {
            Gender             = personInfo.Gender;
            BirthDate          = personInfo.BirthDate;
            BirthDateEstimated = personInfo.BirthDateEstimated;

            var personNames = PersonName.Create(personInfo);

            Names.Clear();
            AddNames(personNames);

            var addresses = PersonAddress.Create(personInfo);

            Addresses.Clear();
            AddAddresss(addresses);

            var contacts = PersonContact.Create(personInfo);

            Contacts.Clear();
            AddContacts(contacts);
        }