1
0
WCF Data Services doesn't do lazy loading for several reasons. One is that most users want complete control of when a web request is made (as it can be very expensive) and second sometimes it's not technically possible. For example in Silverlight all HTTP requests can be done only through asynchronous API and as such lazy load can't really be implemented since accessing a property is a synchronous operation. As to your question: The WCF Data Services client doesn't know about bidirectional relations. 它将其视为两个独立的关系。所以它不能为你修正链接。 For this to work you could built the knowledge of bidirectional relations into your client side entities (for example your Orders property can fixup the back link when items are added into it). The other possible solution would be to use more complex queries using the $expand query option to load the parent entity in the same request. Unfortunately the LoadProperty/BeginLoadProperty API doesn't support extending the query this way, you would have to construct the query yourself. 所以为了回答最后一个问题,您只剩下定制实现了。 |
2
0
在wcf-ado.net实体数据服务中。可以使用.expand()包含相关属性
用于样品。 客户-订单-订单项目-产品 |
Bigeyes · 如何在MVVM模式中添加行? 8 年前 |
User9898 · 悬停回到原始颜色时为什么选择 8 年前 |
Huma Ali · WCF已完成事件中的异常处理 8 年前 |
Nerd in Training · 文件副本发布错误 9 年前 |