Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of how to implement local database in your Xamarin.Forms applications -
using System.Linq;
using LiteDB;
using Xamarin.Forms;
namespace DemoLiteDB
public partial class MainPage : ContentPage
LiteDatabase _dataBase;
LiteCollection<Customer> Customers;
public MainPage()
_dataBase = new LiteDatabase(DependencyService.Get<IHelper>().GetFilePath("Banco.db"));
Customers = _dataBase.GetCollection<Customer>();
ListCustomers.ItemsSource = Customers.FindAll();
BindingContext = this;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment