Example #1
0
        public ContactData Create(Contact contact)
        {
            var contactData = new ContactData
            {
                EmailAddress = contact.EmailAddress,
                Name = contact.Name,
                PhoneNumber = contact.PhoneNumber
            };

            return contactData;
        }
Example #2
0
 private ContactData Modify(ContactData contactData, JToken json)
 {
     var data = contactData ?? new ContactData();
     data.Name = json["name"] != null ? json.Value<string>("name") : data.Name;
     data.PhoneNumber = json["phoneNumber"] != null ? json.Value<string>("phoneNumber") : data.PhoneNumber;
     data.EmailAddress = json["emailAddress"] != null ? json.Value<string>("emailAddress") : data.EmailAddress;
     return data;
 }