ADO.NET Data Service: Synchron Query

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top