C# Class NHibernate.AdoNet.SqlClientSqlCommandSet

Expose the batch functionality in ADO.Net 2.0 Microsoft in its wisdom decided to make my life hard and mark it internal. Through the use of Reflection and some delegates magic, I opened up the functionality. Observable performance benefits are 50%+ when used, so it is really worth it.
Inheritance: IDisposable
Afficher le fichier Open project: nhibernate/nhibernate-core Class Usage Examples

Méthodes publiques

Méthode Description
Append ( SqlCommand command ) : void

Append a command to the batch

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ExecuteNonQuery ( ) : int

Executes the batch

Private Methods

Méthode Description
AssertHasParameters ( SqlCommand command ) : void

This is required because SqlClient.SqlCommandSet will throw if the command has no parameters.

SqlClientSqlCommandSet ( ) : System

Method Details

Append() public méthode

Append a command to the batch
public Append ( SqlCommand command ) : void
command System.Data.SqlClient.SqlCommand
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

ExecuteNonQuery() public méthode

Executes the batch
public ExecuteNonQuery ( ) : int
Résultat int