开发者

4004 RIA Service error - Remote database

开发者 https://www.devze.com 2023-03-31 06:55 出处:网络
After finaly be abble to setup my silverlight app with RIA, I call the following code to get my list of citie objects from my remote database:

After finaly be abble to setup my silverlight app with RIA, I call the following code to get my list of citie objects from my remote database:

_context = context;
var load =_context.Load(_context.GetCitiesQuery());
_cities = new ObservableCollection<City>(load.Entities);

I get no errors, but also no data. After using fiddler I do see that I get a responce looking like this:

@GetCitiesResponsehttp://tempuri.org/@GetCitiesResult aDomainServices i)http://www.w3.org/2001/XMLSchema-instance^ TotalCount�^ RootResults b4http://schemas.datacontract.org/2004/07/Gymsport.Web_City_CityID�_CityName�Oelegem_PostCode�� _City_CityID�_CityName�Ranst_PostCode�� _City_CityID�_CityName�Emblem_PostCode�� _City_CityID�_CityName�Ranst_PostCode��

Which is a lot of rubbish, but between the lines you can read it returns a couple of cities. But for some reason m开发者_StackOverflow社区y silverlight app doens't pick up on those.

Any suggestions on how to look for a solution?

Thanks in advance. Grtz T


Solution:

I had to work with the EntityList object to convert the result of the query to an observable collection. Thank you Firefox ErrorConsole :)

0

精彩评论

暂无评论...
验证码 换一张
取 消