Udostępnij za pośrednictwem


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

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

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

Syntax

'Declaration
Public Function BeginLoadProperty ( _
    entity As Object, _
    propertyName As String, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As DataServiceContext 
Dim entity As Object 
Dim propertyName As String 
Dim callback As AsyncCallback 
Dim state As Object 
Dim returnValue As IAsyncResult 

returnValue = instance.BeginLoadProperty(entity, _
    propertyName, callback, state)
public IAsyncResult BeginLoadProperty(
    Object entity,
    string propertyName,
    AsyncCallback callback,
    Object state
)
public:
IAsyncResult^ BeginLoadProperty(
    Object^ entity, 
    String^ propertyName, 
    AsyncCallback^ callback, 
    Object^ state
)
member BeginLoadProperty : 
        entity:Object * 
        propertyName:string * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult
public function BeginLoadProperty(
    entity : Object, 
    propertyName : String, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult

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 that is used to pass context data to the callback method.

Return Value

Type: System.IAsyncResult
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.

See Also

Reference

DataServiceContext Class

BeginLoadProperty Overload

System.Data.Services.Client Namespace