Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created August 15, 2018 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/1cc6da842bb3e951628532b43b98ee1d to your computer and use it in GitHub Desktop.
Save juucustodio/1cc6da842bb3e951628532b43b98ee1d to your computer and use it in GitHub Desktop.
Example of how to implement local database in your Xamarin.Forms applications - http://julianocustodio.com/litedb
private async void List_Selected(object sender, SelectedItemChangedEventArgs e)
{
var action = await DisplayActionSheet("Atenção", "Não", "Sim", "Deletar ?");
if (action == "Sim")
{
var customer = e.SelectedItem as Customer;
Customers.Delete(customer?.Id);
ListCustomers.ItemsSource = Customers.FindAll();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment