Ejemplo n.º 1
0
        public ContactPhone Parse(ContactPhoneModel model)
        {
            try
            {
                var user = new ContactPhone
                {
                    Type = model.Type,
                    Number = model.PhoneNumber
                };

                ////Below code is an example of how to get ID for url's pass in to the model
                //var uri = new Uri(model.URL);
                //var notificationId = int.Parse(uri.Segments.Last());

                return user;
            }
            catch (Exception)
            {
                return null;
            }
        }
Ejemplo n.º 2
0
        public ContactPhoneModel Create(ContactPhone contactPhone)
        {
            var result = new ContactPhoneModel
            {
                Type = contactPhone.Type,
                PhoneNumber = contactPhone.Number,
                ContactId = contactPhone.ContactId
            };

            return result;
        }