Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created August 15, 2018 16:28
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/a2da663e4dfba6c62d3d80070bc18474 to your computer and use it in GitHub Desktop.
Save juucustodio/a2da663e4dfba6c62d3d80070bc18474 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 void Get(object sender, System.EventArgs e)
{
Customers = _dataBase.GetCollection<Customer>();
if (Customers.Count() > 0)
{
var customer = Customers.FindAll().FirstOrDefault(x => x.Name == EntryName.Text);
DisplayAlert("id: " +customer?.Id, "Name: "+customer?.Name, "ok");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment