ADO.NET Data Service: Synchron Query

  • Thread starter Thread starter Holger Seemüller
  • Start date Start date
H

Holger Seemüller

Hi everyone,

I am working with these ADO.NET Data Services for the first time and
although they look very usable for my task, there is something confusing me:
Is there no possibility to make a synchron query to the service, e.g.
something like this:

List<bar> ret = new List<bar>();
var query = from foo in context.bar
select foo;
ret = query.ToList();

If I try it that way, I get a NotSupportedException in the last line ("The
specified method is not supported" - or something like that, I have got only
the german version...). Nevertheless, in the internet there are quite a lot
of examples, telling me, that this should work...

Or is it obligatory to cast the query to an DataServiceQuery and execute it
asynchronously via query.BeginExecute(...)?


Greetings,
Holger
 
Back
Top