0

I want to get the value where id = 1 from my DB when I execute tapImage_tapped.

async void tapImage_Tapped(object sender, EventArgs e)
{
    await Navigation.PushAsync(new InfoPage() 
    { 
        BindingContext = new values().id_values == 1; 
    });
}

this is the code I have in my DB class. should I use this?

public values GetOneInfo(int id)
{
     lock (locker)
     {
         //return s.Table<Info>().LastOrDefault(t => t.info_id.Equals(id));
         return s.Table<values>().Where(i => i.id_values == id).FirstOrDefault();
     }
}
Pavan V Parekh
  • 1,906
  • 2
  • 19
  • 36
  • have you tried it? Does it work? You could have done that in less time than posting here and waiting for a response. – Jason Oct 05 '17 at 02:32
  • Sorry but im not really familiar on c# coding. regarding to your question, i cant seem to make it work. it doesnt pick any value from the id=1. what do you think am i missing? – Kurt Ruzell Oct 05 '17 at 23:03
  • are you sure your db contains a row that matches? – Jason Oct 05 '17 at 23:14

0 Answers0