Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IDbCommandCallback(T) Interface

Generic callback interface for code that operates on a IDbCommand.

For a list of all members of this type, see IDbCommandCallback(T) Members .

[Visual Basic]
Public Interface IDbCommandCallback(Of T)
public interface IDbCommandCallback<T>

Generic template parameters

The return type from executing the callback


Allows you to execute any number of operations on a single IDbCommand, 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 IDbCommand has been created by the framework and will have its Connection property set and the Transaction property set based on the transaction context.

As an alternative to using this interface you can use the delegate version which is particularly nice when using anonymous delegates for writing more terse code and having easy access to the variables in the calling class.

See ICommandCallback for a version that has the base class DbCommand as the callback argument.


Namespace: Spring.Data.Generic

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

See Also

IDbCommandCallback(T) Members | Spring.Data.Generic Namespace