![]() |
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()包含相关属性
用于样品。 客户-订单-订单项目-产品 |
![]() |
Mohammad · Angular js应用程序函数无法计算总计 7 年前 |
![]() |
Tim · 正在处理DataServiceContext? 9 年前 |
![]() |
mpeterson · 无法获取WCF数据服务示例以运行 10 年前 |
|
JAG · 具有地理空间的WCF数据服务 12 年前 |
![]() |
John · 如何向WCF数据服务添加简单计数 12 年前 |