I have an SQLite database in my app and want to navigate to a specific page by clicking the button (retrieving it from the database). I have GetPageAsync method in my database:
public Task<List<ArtistPageModel>> GetPageAsync(string keyword) { return database.Table<ArtistPageModel>().Where(i => i.Name == keyword).ToListAsync(); }
And ButtonClicked on page where it should be done:
private async void Button_Clicked(object sender, EventArgs e) { var keyword = "Text"; var page = await App.Database.GetPageAsync(keyword); await Navigation.PushAsync(page); }
I know this is wrong but I don't have any other solution because I'm just starting with it. Any help would be appreciated.