Beispiel #1
0
        public async void Save(StoredContactViewModel contactViewModel)
        {
            await CheckForContactStore();

            var contact = new StoredContact(ContactStore)
            {
                RemoteId    = await _remoteIdHelper.GetTaggedRemoteId(ContactStore, contactViewModel.EMail),
                DisplayName = contactViewModel.NickName,
                GivenName   = contactViewModel.FirstName,
                FamilyName  = contactViewModel.FamilyName
            };

            await contact.SaveAsync();
        }
Beispiel #2
0
        public async void Update(StoredContactViewModel contactViewModel)
        {
            await CheckForContactStore();

            var contact = await GetContactByEmail(contactViewModel.EMail);

            if (contact == null)
            {
                return;
            }

            contact.GivenName   = contactViewModel.FirstName;
            contact.FamilyName  = contactViewModel.FamilyName;
            contact.DisplayName = contactViewModel.NickName;

            contact.SaveAsync();
        }