DataServiceContext.LoadProperty<T> 方法 (Object, String, DataServiceQueryContinuation<T>)
透過使用提供的泛型查詢接續物件,從資料服務載入下一頁相關實體。
不受到適用於 Silverlight 的 WCF Data Services 5.0 用戶端支援。
命名空間: System.Data.Services.Client
組件: Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)
語法
'宣告
Public Function LoadProperty(Of T) ( _
entity As Object, _
propertyName As String, _
continuation As DataServiceQueryContinuation(Of T) _
) As QueryOperationResponse(Of T)
'用途
Dim instance As DataServiceContext
Dim entity As Object
Dim propertyName As String
Dim continuation As DataServiceQueryContinuation(Of T)
Dim returnValue As QueryOperationResponse(Of T)
returnValue = instance.LoadProperty(entity, _
propertyName, continuation)
public QueryOperationResponse<T> LoadProperty<T>(
Object entity,
string propertyName,
DataServiceQueryContinuation<T> continuation
)
public:
generic<typename T>
QueryOperationResponse<T>^ LoadProperty(
Object^ entity,
String^ propertyName,
DataServiceQueryContinuation<T>^ continuation
)
member LoadProperty :
entity:Object *
propertyName:string *
continuation:DataServiceQueryContinuation<'T> -> QueryOperationResponse<'T>
JScript 不支援泛型型別及方法。
型別參數
- T
要載入之集合的元素型別。
參數
- entity
型別:System.Object
包含要載入之屬性的實體。
- propertyName
型別:System.String
要載入的指定之實體的屬性名稱。
- continuation
型別:System.Data.Services.Client.DataServiceQueryContinuation<T>
DataServiceQueryContinuation<T> 物件,表示從資料服務載入的下一頁相關實體。
傳回值
型別:System.Data.Services.Client.QueryOperationResponse<T>
包含下一頁相關實體資料的回應。
例外狀況
例外狀況 | 條件 |
---|---|
InvalidOperationException |
備註
當 entity 處於 Unchanged 或 Modified 狀態時,相關實體是以 Unchanged 狀態的物件形式載入,而連結也是處於 Unchanged 狀態。
當 entity 處於 Deleted 狀態時,相關實體是以 Unchanged 狀態的物件形式載入,而連結則是處於 Deleted 狀態。