Enterprise Library Data Access Application Block  7.0-rc1
The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.
Microsoft.Practices.EnterpriseLibrary.Data.DataAccessor< TResult > Class Template Referenceabstract

An abstract class representing an object that wraps a database operation. An Accessor is executed, at which point it will go out to the database and return a IEnumerable<TResult> of whatever type TResult is. More...

Inheritance diagram for Microsoft.Practices.EnterpriseLibrary.Data.DataAccessor< TResult >:
Microsoft.Practices.EnterpriseLibrary.Data.CommandAccessor< TResult > Microsoft.Practices.EnterpriseLibrary.Data.SprocAccessor< TResult > Microsoft.Practices.EnterpriseLibrary.Data.SqlStringAccessor< TResult >

Public Member Functions

abstract IEnumerable< TResult > Execute (params object[] parameterValues)
 Execute the database operation synchronously, returning the IEnumerable<TResult> sequence containing the resulting objects. More...
 
abstract IAsyncResult BeginExecute (AsyncCallback callback, object state, params object[] parameterValues)
 Begin executing the database object asynchronously, returning a IAsyncResult object that can be used to retrieve the result set after the operation completes. More...
 
abstract IEnumerable< TResult > EndExecute (IAsyncResult asyncResult)
 Complete an operation started by BeginExecute. More...
 

Detailed Description

An abstract class representing an object that wraps a database operation. An Accessor is executed, at which point it will go out to the database and return a IEnumerable<TResult> of whatever type TResult is.

Member Function Documentation

◆ BeginExecute()

abstract IAsyncResult Microsoft.Practices.EnterpriseLibrary.Data.DataAccessor< TResult >.BeginExecute ( AsyncCallback  callback,
object  state,
params object[]  parameterValues 
)
pure virtual

Begin executing the database object asynchronously, returning a IAsyncResult object that can be used to retrieve the result set after the operation completes.

Parameters
callbackCallback to execute when the operation's results are available. May be null if you don't wish to use a callback.
stateExtra information that will be passed to the callback. May be null.
parameterValuesParameters to pass to the database.

This operation will throw if the underlying Database object does not support asynchronous operation.

Exceptions
InvalidOperationExceptionThe underlying database does not support asynchronous operation.
Returns
The IAsyncResult representing this operation.

Implemented in Microsoft.Practices.EnterpriseLibrary.Data.SqlStringAccessor< TResult >, and Microsoft.Practices.EnterpriseLibrary.Data.SprocAccessor< TResult >.

◆ EndExecute()

abstract IEnumerable<TResult> Microsoft.Practices.EnterpriseLibrary.Data.DataAccessor< TResult >.EndExecute ( IAsyncResult  asyncResult)
pure virtual

Complete an operation started by BeginExecute.

Returns
The result sequence.

Implemented in Microsoft.Practices.EnterpriseLibrary.Data.CommandAccessor< TResult >.

◆ Execute()

abstract IEnumerable<TResult> Microsoft.Practices.EnterpriseLibrary.Data.DataAccessor< TResult >.Execute ( params object[]  parameterValues)
pure virtual

Execute the database operation synchronously, returning the IEnumerable<TResult> sequence containing the resulting objects.

Parameters
parameterValuesParameters to pass to the database.
Returns
The sequence of result objects.

Implemented in Microsoft.Practices.EnterpriseLibrary.Data.SqlStringAccessor< TResult >, and Microsoft.Practices.EnterpriseLibrary.Data.SprocAccessor< TResult >.


The documentation for this class was generated from the following file: