i have code like below:
QueryExpression query = new QueryExpression();
query.EntityName = "new_callistyorder";
ColumnSet col = new ColumnSet("new_nomororder","new_customer");
query.ColumnSet = col;
EntityCollection colect = service.RetrieveMultiple(query);
string str = string.Empty;
foreach (Entity e in colect.Entities)
{
if(e.Contains("new_nomororder")){
str = str + e.Attributes["new_nomororder"].ToString();
}
}
throw new InvalidPluginExecutionException(str);
Trough this code. I am able to get data from microsoft dynamic entity. Now, i want to get the data which have biggest id. If in SQL Query, it would be looks something like this : "Select top 1 my_id from Account order by my_id desc". How can i do that on queryexpression ? Thanks