Why is my WCF DataService not loading extended properties?

I discovered some objects (EF) via data service:
- Races
- Leagues
--- Teams
---- Participants

I get races through:

proxy.races

      

To get the nested races properties, I use the markup method like this:

proxy.Races.Expand("Leagues/Teams/Participants");

      

I am accessing a webservice through a proxy (fiddler) to check the result. When I look at the results in the fiddler I can clearly see that the nested structure is loaded correctly, but when I inspect the object in Visual Studio the objects / subcategories are empty. What am I doing wrong?

  • Frederik
+3


source to share


1 answer


I experimented a bit and was puzzled that the correct data was sent by the server but was not merged correctly into the DataService Entity. By setting the MergeOption property on the proxy object, I could get it to update the entities.

proxy.MergeOption = System.Data.Services.Client.MergeOption.OverwriteChanges;

      



I hope this helps others with the same problem :-)

  • Frederik
+3


source







All Articles