PC Review


Reply
Thread Tools Rate Thread

ADO.NET Data Service: Synchron Query

 
 
Holger Seemüller
Guest
Posts: n/a
 
      28th Aug 2009
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

 
Reply With Quote
 
 
 
 
Holger Seemüller
Guest
Posts: n/a
 
      29th Aug 2009
Short addition: I am using Silverlight 3 to consume the service!

"Holger Seemüller" <(E-Mail Removed)> schrieb im
Newsbeitrag news:eJe8%(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
Holger Seemüller
Guest
Posts: n/a
 
      29th Aug 2009
Got the answer:
http://blog.andrei.rinea.ro/post/200...-entities.aspx

"Holger Seemüller" <(E-Mail Removed)> schrieb im
Newsbeitrag news:%(E-Mail Removed)...
> Short addition: I am using Silverlight 3 to consume the service!
>
> "Holger Seemüller" <(E-Mail Removed)> schrieb im
> Newsbeitrag news:eJe8%(E-Mail Removed)...
>> 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
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export query to Excel use data from the query as part of file nam ram Microsoft Access External Data 5 8th May 2010 03:58 AM
Can the new and hot iPod 3G be synchron with into Vista Ultimate WM? kurjantottam Windows Vista Mail 0 17th Jul 2008 06:54 PM
When attempting to send mail all that happens is folders synchron. =?Utf-8?B?Zml4aXRsYW5l?= Microsoft Outlook Discussion 0 7th Jul 2006 08:43 PM
Trying to query the Address table data of AdventureWorks database from Query Analyzer - need help! Learner Microsoft ASP .NET 1 30th Jan 2006 08:58 PM
Linking problem - Access query to MS query to extract data to Exce =?Utf-8?B?RmF0TWFu?= Microsoft Access Queries 0 23rd Nov 2004 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:32 AM.