private async Task DeleteContact(ContactViewModel contact) { if (await _pageService.DisplayAlert( "Delete contact?", $"Are you sure you want to delete {contact.FullName}", "Yes", "No")) { Contacts.Remove(contact); } var contactInDb = await _contactStore.Get(contact.Id); await _contactStore.Delete(contactInDb.Id); }
/// <summary> /// gets all the available contacts /// </summary> /// <returns></returns> public IEnumerable <Contact> Get() { return(contactStore.Get()); }