Telerik Data Virtualization, WCF RIA Services and Visual Studio Async CTP

by Vladimir Enchev | Go comment!

Last week (MIX 2011), Microsoft released the second Visual Studio Async CTP and I’ve decided to give it a try and implement one of my blog posts related to our Silverlight Data Virtualization with WCF RIA Services.

To do this I’ve made two extension methods for DomainContext: LoadAsync<T>() and CountAsync<T>().


image

The first method will return the entities from a EntityQuery<T> and the second will return asynchronously count for the specified query.

 

And here is the result:

image

 

As you can see the only hardcoded value here is LoadSize for the virtual collection and everything else is retrieved and applied asynchronously using async and await keywords.

 

Enjoy!

 

,
Senior Technical Architect

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by Vladimir Enchev - or - read latest articles in Developer Tools