locked
Silverlight RC0 problems RRS feed

  • Question

  • Hi All,

     

    I just installed the latest Silverlight Tools setup for the  Visul Studio SP1. The problem is I could not refer any Dataservices. Its throwing Object refernce error. I was just trying to refer my ado.net dataservice's. please help

    Thanks 

     

    Monday, September 29, 2008 2:15 PM

Answers

  • Hello, can you post some code? We did have some problems related to Data Service in Beta 2, but it should have been fixed in RC. One problem may be you forgot to execute the query asynchronously. Silverlight doesn't support synchronous web service invoking, so you must do that asynchronously. Something like this:

    YourEntities context = new YourEntities(new Uri("your uri"));

    var query = some query;

    query.BeginExecute(new AsyncCallback((result) =>

    {

    aDataGrid.ItemsSource = query.EndExecute(result).ToList();

    }), null);

     

    Also how are you generating the client side EDM? In RC, you don't need to use any outside command line tools. You can simply use the Add Service Reference feature, similar to referencing a normal WCF service.

    Wednesday, October 1, 2008 4:11 AM