DataServiceContext.LoadProperty Method

Definition

Overloads

LoadProperty(Object, String)

Loads deferred content for a specified property from the data service.

LoadProperty(Object, String, DataServiceQueryContinuation)

Loads the next page of related entities from the data service by using the supplied query continuation object.

LoadProperty(Object, String, Uri)

Loads a page of related entities by using the supplied next link URI.

LoadProperty<T>(Object, String, DataServiceQueryContinuation<T>)

Loads the next page of related entities from the data service by using the supplied generic query continuation object.

LoadProperty(Object, String)

Loads deferred content for a specified property from the data service.

public virtual Microsoft.OData.Client.QueryOperationResponse LoadProperty (object entity, string propertyName);
abstract member LoadProperty : obj * string -> Microsoft.OData.Client.QueryOperationResponse
override this.LoadProperty : obj * string -> Microsoft.OData.Client.QueryOperationResponse
Public Overridable Function LoadProperty (entity As Object, propertyName As String) As QueryOperationResponse

Parameters

entity
Object

The entity that contains the property to load.

propertyName
String

The name of the property of the specified entity to load.

Returns

The response to the load operation.

Remarks

If entity is in in detached or added state, this method will throw an InvalidOperationException since there is nothing it can load from the server.

If entity is in unchanged or modified state, this method will load its collection or reference elements as unchanged with unchanged bindings.

If entity is in deleted state, this method will load the entities linked to by its collection or reference property in the unchanged state with bindings in the deleted state.

Applies to

LoadProperty(Object, String, DataServiceQueryContinuation)

Loads the next page of related entities from the data service by using the supplied query continuation object.

public virtual Microsoft.OData.Client.QueryOperationResponse LoadProperty (object entity, string propertyName, Microsoft.OData.Client.DataServiceQueryContinuation continuation);
abstract member LoadProperty : obj * string * Microsoft.OData.Client.DataServiceQueryContinuation -> Microsoft.OData.Client.QueryOperationResponse
override this.LoadProperty : obj * string * Microsoft.OData.Client.DataServiceQueryContinuation -> Microsoft.OData.Client.QueryOperationResponse
Public Overridable Function LoadProperty (entity As Object, propertyName As String, continuation As DataServiceQueryContinuation) As QueryOperationResponse

Parameters

entity
Object

The entity that contains the property to load.

propertyName
String

The name of the property of the specified entity to load.

continuation
DataServiceQueryContinuation

A DataServiceQueryContinuation<T> object that represents the next page of related entities to load from the data service.

Returns

The response that contains the next page of related entity data.

Exceptions

When entity is in the Detached or Added state.

Remarks

If entity is in in detached or added state, this method will throw an InvalidOperationException since there is nothing it can load from the server.

If entity is in unchanged or modified state, this method will load its collection or reference elements as unchanged with unchanged bindings.

If entity is in deleted state, this method will load the entities linked to by its collection or reference property in the unchanged state with bindings in the deleted state.

Applies to

LoadProperty(Object, String, Uri)

Loads a page of related entities by using the supplied next link URI.

public virtual Microsoft.OData.Client.QueryOperationResponse LoadProperty (object entity, string propertyName, Uri nextLinkUri);
abstract member LoadProperty : obj * string * Uri -> Microsoft.OData.Client.QueryOperationResponse
override this.LoadProperty : obj * string * Uri -> Microsoft.OData.Client.QueryOperationResponse
Public Overridable Function LoadProperty (entity As Object, propertyName As String, nextLinkUri As Uri) As QueryOperationResponse

Parameters

entity
Object

The entity that contains the property to load.

propertyName
String

The name of the property of the specified entity to load.

nextLinkUri
Uri

The URI that is used to load the next results page.

Returns

An instance of QueryOperationResponse<T> that contains the results of the request.

Exceptions

When entity is in a Detached or Added state.

Remarks

If entity is in in detached or added state, this method will throw an InvalidOperationException since there is nothing it can load from the server.

If entity is in unchanged or modified state, this method will load its collection or reference elements as unchanged with unchanged bindings.

If entity is in deleted state, this method will load the entities linked to by its collection or reference property in the unchanged state with bindings in the deleted state.

Applies to

LoadProperty<T>(Object, String, DataServiceQueryContinuation<T>)

Loads the next page of related entities from the data service by using the supplied generic query continuation object.

public virtual Microsoft.OData.Client.QueryOperationResponse<T> LoadProperty<T> (object entity, string propertyName, Microsoft.OData.Client.DataServiceQueryContinuation<T> continuation);
abstract member LoadProperty : obj * string * Microsoft.OData.Client.DataServiceQueryContinuation<'T> -> Microsoft.OData.Client.QueryOperationResponse<'T>
override this.LoadProperty : obj * string * Microsoft.OData.Client.DataServiceQueryContinuation<'T> -> Microsoft.OData.Client.QueryOperationResponse<'T>
Public Overridable Function LoadProperty(Of T) (entity As Object, propertyName As String, continuation As DataServiceQueryContinuation(Of T)) As QueryOperationResponse(Of T)

Type Parameters

T

Element type of collection to load.

Parameters

entity
Object

The entity that contains the property to load.

propertyName
String

The name of the property of the specified entity to load.

continuation
DataServiceQueryContinuation<T>

A DataServiceQueryContinuation<T> object that represents the next page of related entities to load from the data service.

Returns

The response that contains the next page of related entity data.

Exceptions

When entity is in the Detached or Added state.

Remarks

If entity is in in detached or added state, this method will throw an InvalidOperationException since there is nothing it can load from the server.

If entity is in unchanged or modified state, this method will load its collection or reference elements as unchanged with unchanged bindings.

If entity is in deleted state, this method will load the entities linked to by its collection or reference property in the unchanged state with bindings in the deleted state.

Applies to