WCF DataServices Expand 12 Limitations
I'm using WCF DataServices in a Silverlight app. My issues is that with the model I'm referencing I need access to more than 12 expanded properties. The reason is that I am referencing a service with recursive model and basically I need 5 expands on 4 levels which exceed开发者_运维百科s the max number of expands which is apparently 12. Is there another solution rather than calling BeginLoadProperty hundreds or times to get the desired effect?
You could build multiple queries on the client which together will get you all the data you need and then use the DataServiceContext.ExecuteBatch to get them all in a single request. It will still run multiple queries against the database, but you will get just one HTTP request and one response.
精彩评论