Hi cuneytgargin,
query2 is an IEntityQuery<WebUsers> and not a collection with the expected results.
You need to execute the query and iterate thru its results.
i.e.
var query2 = mgr.WebUsers.Where(c => c.username == "cg");
query.ExecuteAsync(op => {
foreach (WebUser auser in op.Results) {
if (auser.password == "cg") {
MessageBox.Show("OK");
} else {
MessageBox.Show("NOTOK");
}
}
});
or, if running synchronously:
var query2 = mgr.WebUsers.Where(c => c.username == "cg");
var results = query2.Execute();
foreach (WebUser auser in results) {
if (auser.password == "cg") {
MessageBox.Show("OK");
} else {
MessageBox.Show("NOTOK");
}
}