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 狀態。