DomainContext.Load<TEntity> Method (EntityQuery<TEntity>, LoadBehavior, Boolean)
[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, and value indicating whether an error results in an exception.
Namespace: System.ServiceModel.DomainServices.Client
Assembly: System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)
Syntax
'Declaration
Public Function Load(Of TEntity As Entity) ( _
query As EntityQuery(Of TEntity), _
loadBehavior As LoadBehavior, _
throwOnError As Boolean _
) As LoadOperation(Of TEntity)
'Usage
Dim instance As DomainContext
Dim query As EntityQuery(Of TEntity)
Dim loadBehavior As LoadBehavior
Dim throwOnError As Boolean
Dim returnValue As LoadOperation(Of TEntity)
returnValue = instance.Load(query, loadBehavior, _
throwOnError)
public LoadOperation<TEntity> Load<TEntity>(
EntityQuery<TEntity> query,
LoadBehavior loadBehavior,
bool throwOnError
)
where TEntity : Entity
public:
generic<typename TEntity>
where TEntity : Entity
LoadOperation<TEntity>^ Load(
EntityQuery<TEntity>^ query,
LoadBehavior loadBehavior,
bool throwOnError
)
member Load :
query:EntityQuery<'TEntity> *
loadBehavior:LoadBehavior *
throwOnError:bool -> LoadOperation<'TEntity> when 'TEntity : Entity
JScript does not support generic types and methods.
Type Parameters
- TEntity
The entity type to be loaded.
Parameters
- query
Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
The query to invoke.
- loadBehavior
Type: System.ServiceModel.DomainServices.Client.LoadBehavior
The LoadBehavior to apply.
- throwOnError
Type: System.Boolean
true if an unhandled error should result in an exception; otherwise, false.
To handle an operation error, MarkErrorAsHandled can be called from the operation completion callback or from a Completed event handler.
Return Value
Type: System.ServiceModel.DomainServices.Client.LoadOperation<TEntity>
The load operation.