void FilterContacts(string text) { if (string.IsNullOrEmpty(text)) { Contacts = ContactsBackup; } else { text = text.ToLower(); Contacts = new ObservableCollection <Contact>(ContactsBackup.Where(c => c.ToString().ToLower().Contains(text.ToLower()))); } }
// PUT api/<controller>/5 /// <summary> /// Puts the specified identifier. /// </summary> /// <param name="id">The identifier.</param> /// <param name="value">The value.</param> /// <returns></returns> /// <exception cref="HttpResponseException"></exception> public ContactsBackup Put(string id, [FromBody] ContactsBackup value) { return(ContactsBackupManager.UpdateItem(value)); }
// POST api/<controller> /// <summary> /// Posts the specified value. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public ContactsBackup Post([FromBody] ContactsBackup value) { return(ContactsBackupManager.AddItem(value)); }