Returning stored proc data RRS feed

  • Question

  • In a similar way to how I'm struggling to return relational data in RIA Services (in this thread: http://forums.silverlight.net/forums/p/178807/402812.aspx#402812) I've also struggled to return data from a stored procedure.

    My stored proc simply returns 5 'counts'. In other words, a single record with 5 int values. There is no key, I just want to return the single record to the UI so I can bind it to a chart. I have tried everything I can think of in RIA Services to pull this off, but to no avail. When I create the Entity Data Model I can check off the stored procedure, but then I'm lost from there, and can't find any documentation on it.

    I've tried creating an entity that will return the data and assocating it with that stored proc (I was able to do that w/ LINQ to SQL) but had no success with Entity Framework. The latter seems to want every entity to have a key. Well, I don't have or need a key in this case. Even if I try creating a false key (returning an Id of 1 from the stored proc) and having an Id key on the entity I created on the model I still can't get it to work.

    Any help would be greatly appreciated.


    Tuesday, April 27, 2010 7:17 AM