Access to table element

May 17, 2012 at 7:51 AM

I s it possible to access e.g. "First Name" and compare it with some other string. 

May 18, 2012 at 1:03 AM

Yes, just use Linq.  Something like

If I follow the question correctly, just issues a query like
var table = await db.Table<User>();

var person = table.Where(one=>one.Name = someNameVariable && one.Passwrd ==
somePasswordVariable).FirstOrDefault(), then check for null. It is just
data, so you do whatever action you need to with it.

May 18, 2012 at 10:49 AM




I was working with your WinRTdbQuickstart example and i have "russia" as a entry for "Firstname". 

it didn't work always return null



MainViewModel min = new MainViewModel ();

 var personia = min.People.Where((one => one.FirstName == "russia" )).FirstOrDefault();  

//People is variable defined by you  in MainViewModel.cs    


if (personia == null




MessageDialog msg = new MessageDialog("hiiifgfgfgfgfgfgfgfgfgfgfgfgfg"





 tell me if I am doing something wrong ?       


May 18, 2012 at 12:43 PM

You must not have any data in People to match your criteria?