public App() { InitializeComponent(); if (database == null) { CreatedDB = new NoteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Notes.db3")); } MainPage = new MainPage(CreatedDB); }
public MainPage(NoteDatabase database) { InitializeComponent(); Note note = new Note { Name = "ales je kok", Text = "ale je bily" }; database.SaveNoteAsync(note); list = database.GetNotesAsync().Result; foreach (Note kok in list) { Console.WriteLine(kok); } }