Export (0) Print
Expand All

DataServiceContext.BeginLoadProperty Method (Object, String, AsyncCallback, Object)

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

Namespace:  System.Data.Services.Client
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)

public IAsyncResult BeginLoadProperty(
	Object entity,
	string propertyName,
	AsyncCallback callback,
	Object state
)

Parameters

entity
Type: System.Object
The entity that contains the property to load.
propertyName
Type: System.String
The name of the property on the specified entity to load.
callback
Type: System.AsyncCallback
The delegate called when a response to the request is received.
state
Type: System.Object
The user-defined state object used to pass context data to the callback method.

Return Value

Type: System.IAsyncResult
An IAsyncResult that represents the status of the asynchronous operation.

Calling this method invokes a network operation to retrieve the value of a property. The property that is specified may be any of the properties on an entity, including properties that represent associations or links. If the property represents an association, 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 update the value of the property.

You must use the BeginInvoke method of the Dispatcher class to correctly marshal the response operation back to the main application thread (the UI thread) of your Silverlight-based application. For more information, see Synchronizing Data for Multithreading.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft