Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of how to implement local database in your Xamarin.Forms applications - http://julianocustodio.com/litedb
private void Insert(object sender, System.EventArgs e)
{
int idCustomer = Customers.Count() == 0 ? 1 : (int) (Customers.Max(x => x.Id) + 1);
Customer customer = new Customer
{
Id = idCustomer,
Name = EntryName.Text,
};
Customers.Insert(customer);
ListCustomers.ItemsSource = Customers.FindAll();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment