Share via


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
    要加载的指定实体的属性名称。

返回值

类型:System.Data.Services.Client.QueryOperationResponse
包含下一页相关实体数据的响应。

异常

异常 条件
InvalidOperationException

当 entity 处于 DetachedAdded 状态时。

注释

当 entity 处于 UnchangedModified 状态时,在 Unchanged 状态下将相关实体作为对象进行加载,此时链接也处于 Unchanged 状态。

当 entity 处于 Deleted 状态时,在 Unchanged 状态下将相关实体作为对象进行加载,此时链接也处于 Deleted 状态。

请参阅

参考

DataServiceContext 类

LoadProperty 重载

System.Data.Services.Client 命名空间