public void AddContact(AddContactRequest request) { try { using (var repo = new Data.ContactsRepository()) { var clist = repo.GetContactList(request.contactlist); if (!clist.ContactIds.Contains(request.contact)) { clist.ContactIds.Add(request.contact); } repo.UpdateContactList(clist); } } catch (Exception ex) { Logger.DebugException("AddContact failed", ex); throw; } }
public void Put(Models.ContactList contact) { try { using (var repo = new Data.ContactsRepository()) { repo.UpdateContactList(contact); } } catch (Exception ex) { Logger.DebugException("Put failed", ex); throw; } }