Reputation: 11
I've managed to retrieve all objects in any class in my backend, apart from the users table. I'm guessing it's a little bit different as it doesn't want to work?
The following is my code working with an table in my database called Post
ParseQuery<ParseObject> query = ParseObject.GetQuery("Post");
IEnumerable<ParseObject> posts = await query.FindAsync();
foreach (ParseObject post in posts)
{
string content = post.Get<string>("content");
txtNames2.Items.Add(content);
}
Upvotes: 0
Views: 206
Reputation: 11
Finally Worked it out! Im guessing this is gonna help a lot of people, as there is no help on the Parse docs for how to retrieve users.
Heres how to do it! I am retrieving all "objectId"s from all of my users and putting them into a combobox.
ParseQuery<ParseUser> query = ParseUser.Query;
IEnumerable<ParseUser> posts = await query.FindAsync();
foreach (ParseUser post in posts)
{
string content = post.ObjectId;
txtUsername.Items.Add(content);
}
Hope that helps people!
Upvotes: 1