I am building an ObjectQuery like this:
string query = "select value obj from Entities.Class as obj " +
"where obj.Property = @Value";
ObjectQuery<Class> oQuery = new ObjectQuery<Class>(query, EntityContext.Instance);
oQuery.Parameters.Add(new ObjectParameter("Value", someVariable));
I can now assign this object as a DataSource for a control, or iterate with a foreach loop or even force a materialization to a List, however, I can I count the number of objects that will be returned, without forcing a materialization?
Do I need to create a companion query that will execute a count() or is there a function that will do that for me somewhere?
Thank you.