Could you provide a few examples of the different ways to get a single object in C#? I'd like to see how to get object using generic GetOqlQuery, regular GetOqlQuery. I want to be able to get the object from a query when I don't know the id. I'm using GetOqlQuery to return IQueryResult and a foreach loop that loops through the correct number of times, but the mpt is always null.
IQueryResult result = scope.GetOqlQuery("SELECT a FROM MenuPermissionTypeExtent as a").Execute();
foreach (MenuPermissionType mpt in result)
string sd = mpt.Name;
I can't get the ParseObjectId to work either. Is the ObjectId the primary key? How do I get the second parameter to ParseObjectId (without adding it right before like in documentation)