public CollectionResponse <Contact> GetContacts() { var response = new CollectionResponse <Contact>(); try { var contacts = _repository.GetCollection(_appSettings.ContactsCollectionName); if (contacts != null) { foreach (var contact in contacts) { if (contact.Identifiers == null) { contact.Personal = new Person() { FirstName = "Anonymous" }; } } response.Collection = contacts; } } catch (Exception ex) { response.Errors.AddRange(ex.ToCollection()); } return(response); }
public CollectionResponse <Interaction> GetInteractions() { var response = new CollectionResponse <Interaction>(); try { response.Collection = _repository.GetCollection(_appSettings.InteractionsCollectionName); } catch (Exception ex) { response.Errors.AddRange(ex.ToCollection()); } return(response); }