Share via


DomainContext.Load Method (EntityQuery, LoadBehavior, Action<LoadOperation>, Object)

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Initiates a load operation for the specified query with the specified load behavior, callback method, and user state.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

Syntax

'Declaration
Public Overridable Function Load ( _
    query As EntityQuery, _
    loadBehavior As LoadBehavior, _
    callback As Action(Of LoadOperation), _
    userState As Object _
) As LoadOperation
'Usage
Dim instance As DomainContext
Dim query As EntityQuery
Dim loadBehavior As LoadBehavior
Dim callback As Action(Of LoadOperation)
Dim userState As Object
Dim returnValue As LoadOperation

returnValue = instance.Load(query, loadBehavior, _
    callback, userState)
public virtual LoadOperation Load(
    EntityQuery query,
    LoadBehavior loadBehavior,
    Action<LoadOperation> callback,
    Object userState
)
public:
virtual LoadOperation^ Load(
    EntityQuery^ query, 
    LoadBehavior loadBehavior, 
    Action<LoadOperation^>^ callback, 
    Object^ userState
)
abstract Load : 
        query:EntityQuery * 
        loadBehavior:LoadBehavior * 
        callback:Action<LoadOperation> * 
        userState:Object -> LoadOperation 
override Load : 
        query:EntityQuery * 
        loadBehavior:LoadBehavior * 
        callback:Action<LoadOperation> * 
        userState:Object -> LoadOperation 
public function Load(
    query : EntityQuery, 
    loadBehavior : LoadBehavior, 
    callback : Action<LoadOperation>, 
    userState : Object
) : LoadOperation

Parameters

  • callback
    Type: System.Action<LoadOperation>
    Optional callback to be called when the load operation completes. The callback must be a delegate taking a single parameter that can accept an instance of the LoadOperation Type returned.

Return Value

Type: System.ServiceModel.DomainServices.Client.LoadOperation
The load operation.

Exceptions

Exception Condition
[ArgumentNullException]

query is nulla null reference (Nothing in Visual Basic).

[InvalidOperationException]

The query was not created by this domain context.

See Also

Reference

DomainContext Class

Load Overload

System.ServiceModel.DomainServices.Client Namespace