public void OnSwiped(object s, EventArgs e) { this.IsVisible = false; ContactDatabase db = new ContactDatabase(dbPath); DependencyService.Get <IToast>().Toasts("deleteContact", db.DeleteContact(Convert.ToInt32(this.contactId.Text))); MessagingCenter.Send <App>((App)Application.Current, "OnContactDeleted"); }
public void Delete(int id) { ContactDatabase contactDatabase = new ContactDatabase(); bool IsDeleted = contactDatabase.DeleteContact(id); if (IsDeleted) { Console.WriteLine("Contact Deleted"); } else { Console.WriteLine("Contact cant be deleted"); } }