Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

CommandDelegate(T) Delegate

Generic callback delegate for code that operates on a DbCommand.

[Visual Basic]
Public Delegate Function CommandDelegate(Of T)( _
   ByVal command As DbCommand _
)
[C#]
public delegate T CommandDelegate<T>(
   DbCommand command
);

Parameters

command
The ADO.NET DbCommand object

Return Value

The object returned from processing with the provided DbCommand

Generic template parameters

T
The return type from executing the callback

Remarks

Allows you to execute any number of operations on a single DbCommand, for example a single ExecuteScalar call or repeated execute calls with varying parameters.

Used internally by AdoTemplate, but also useful for application code. Note that the passed in DbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

Requirements

Namespace: Spring.Data.Generic

Assembly: Spring.Data (in Spring.Data.dll)

See Also

Spring.Data.Generic Namespace