I have a Xamarin App that I primarily write in C#. In de app I've got a SQlite database in which I store an Int (ID), a string and two doubles.
I need the string and two doubles in a Tuple list.
Altohugh I figured out how to put the information in a normal list, I don't know how to put it in a Tuple.
How I populated the normal list:
protected override async void OnAppearing()
{
devListLoc.ItemsSource = await App.Database.GetAllLocations();
}
How I populate Tuple without SQlite:
List list = new List<Tuple<string, double, double>>
{
new Tuple<string, double, double>("tesst1", 57.434180, 7.236162),
new Tuple<string, double, double>("test2", 58.435602, 8.234298),
};
So I want to populate the Tuple list in kindof the same way, but I can't figure out how, nor can I find the answer somewhere else.
Cheers!
Edit: The GetAllLocations task:
public Task<List<BarLoc>> GetAllLocations()
{
return database.QueryAsync<BarLoc>("SELECT * FROM [BarLoc]");
}