Esempio n. 1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var contact = await _contactDAO.Search(id);

            await _contactDAO.Delete(contact);

            return(RedirectToAction(nameof(Index)));
        }
Esempio n. 2
0
        private async void MenuItem_Clicked(object sender, EventArgs e)
        {
            var flag = await  DisplayAlert("Eliminar Contacto", "Eliminar Contacto", "Si", "No");

            if (flag == true)
            {
                var contact = (sender as MenuItem).CommandParameter as Contact;
                manager.Delete(contact);
            }
        }