public InserirPage() { InitializeComponent(); string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Controle.db"); elementoDatabase = new ElementoDatabase(dbPath); }
protected async override void OnAppearing() { base.OnAppearing(); string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Controle.db"); var elementoDatabase = new ElementoDatabase(dbPath); ControleLista.ItemsSource = await elementoDatabase.ConsultarTodosAsync(); }