Επεξεργασία

Κοινή χρήση μέσω


DataServiceContext.BeginLoadProperty Method

Definition

Begins the operation to load the value of the specified property from the data service.

Overloads

BeginLoadProperty(Object, String, AsyncCallback, Object)

Asynchronously loads the value of the specified property from the data service.

BeginLoadProperty(Object, String, DataServiceQueryContinuation, AsyncCallback, Object)

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

BeginLoadProperty(Object, String, Uri, AsyncCallback, Object)

Asynchronously loads a page of related entities from the data service by using the supplied next link URI.

BeginLoadProperty(Object, String, AsyncCallback, Object)

Asynchronously loads the value of the specified property from the data service.

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, callback As AsyncCallback, state As Object) As IAsyncResult

Parameters

entity
Object

The entity that contains the property to load.

propertyName
String

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

callback
AsyncCallback

The delegate called when a response to the request is received.

state
Object

The user-defined state object that is used to pass context data to the callback method.

Returns

An IAsyncResult that represents the status of the asynchronous operation.

Remarks

Calling this method invokes a network operation to retrieve the value of a property. The property specified may be any one of the properties on an entity, including properties which represent associations or links. If the property represents an association or link or a deferred property, calling this method provides the client with a way to lazily load related resources. If the entity is in the modified state, the property value loads related entities and marks them and any links as unchanged.

If the property is already loaded, calling this method lets you refresh the value of the property.

Applies to

BeginLoadProperty(Object, String, DataServiceQueryContinuation, AsyncCallback, Object)

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

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, System::Data::Services::Client::DataServiceQueryContinuation ^ continuation, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, System.Data.Services.Client.DataServiceQueryContinuation continuation, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * System.Data.Services.Client.DataServiceQueryContinuation * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, continuation As DataServiceQueryContinuation, callback As AsyncCallback, state As Object) As IAsyncResult

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 entity data to return from the data service.

callback
AsyncCallback

Delegate to invoke when results are available for client consumption.

state
Object

User-defined state object passed to the callback.

Returns

An IAsyncResult that represents the status of the operation.

Remarks

The supplied DataServiceQueryContinuation<T> object contains the URI that, when executed, returns the next page of data in the query result.

Applies to

BeginLoadProperty(Object, String, Uri, AsyncCallback, Object)

Asynchronously loads a page of related entities from the data service by using the supplied next link URI.

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, Uri ^ nextLinkUri, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, Uri nextLinkUri, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * Uri * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, nextLinkUri As Uri, callback As AsyncCallback, state As Object) As IAsyncResult

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 used to load the next results page.

callback
AsyncCallback

Delegate to invoke when results are available for client consumption.

state
Object

User-defined state object passed to the callback.

Returns

An IAsyncResult object that is used to track the status of the asynchronous operation.

Remarks

When entity is in an Unchanged or Modified state, the related entities are loaded in the Unchanged state, and the links between the entities are also created in an Unchanged state.

When entity is in a Deleted state, the related entities are loaded in the Unchanged state, and the links between the entities are created in the Deleted state.

Applies to