public async Task <IActionResult> DeleteConfirmed(int id) { var contact = await _contactDAO.Search(id); await _contactDAO.Delete(contact); return(RedirectToAction(nameof(Index))); }
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); } }