DataServiceContext.LoadProperty 方法 (Object, String, DataServiceQueryContinuation)
通过使用所提供的查询延续对象,从数据服务加载下一页相关实体。
用于 Silverlight 的 WCF Data Services 5.0 客户端不支持。
命名空间: System.Data.Services.Client
程序集: Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)
语法
声明
Public Function LoadProperty ( _
entity As Object, _
propertyName As String, _
continuation As DataServiceQueryContinuation _
) As QueryOperationResponse
用法
Dim instance As DataServiceContext
Dim entity As Object
Dim propertyName As String
Dim continuation As DataServiceQueryContinuation
Dim returnValue As QueryOperationResponse
returnValue = instance.LoadProperty(entity, _
propertyName, continuation)
public QueryOperationResponse LoadProperty(
Object entity,
string propertyName,
DataServiceQueryContinuation continuation
)
public:
QueryOperationResponse^ LoadProperty(
Object^ entity,
String^ propertyName,
DataServiceQueryContinuation^ continuation
)
member LoadProperty :
entity:Object *
propertyName:string *
continuation:DataServiceQueryContinuation -> QueryOperationResponse
public function LoadProperty(
entity : Object,
propertyName : String,
continuation : DataServiceQueryContinuation
) : QueryOperationResponse
参数
- entity
类型:System.Object
包含要加载的属性的实体。
- propertyName
类型:System.String
要加载的指定实体的属性名称。
- continuation
类型:System.Data.Services.Client.DataServiceQueryContinuation
DataServiceQueryContinuation<T> 对象,表示要从数据服务加载的下一页相关实体。
返回值
类型:System.Data.Services.Client.QueryOperationResponse
包含下一页相关实体数据的响应。
异常
异常 | 条件 |
---|---|
InvalidOperationException |
注释
当 entity 处于 Unchanged 或 Modified 状态时,在 Unchanged 状态下将相关实体作为对象进行加载,此时链接也处于 Unchanged 状态。
当 entity 处于 Deleted 状态时,在 Unchanged 状态下将相关实体作为对象进行加载,此时链接也处于 Deleted 状态。