C# Class Habanero.DB.ManagedConnection

Facade to provide a cheap leasing effect on database connections for helping with concurrency
Inheritance: IDbConnection
Datei anzeigen Open project: Chillisoft/habanero

Public Methods

Method Description
BeginTransaction ( ) : IDbTransaction

Begins a database transaction.

BeginTransaction ( IsolationLevel il ) : IDbTransaction

Begins a database transaction with the specified T:System.Data.IsolationLevel value.

ChangeDatabase ( string databaseName ) : void

Changes the current database for an open Connection object.

Close ( ) : void

Closes the connection to the database.

CreateCommand ( ) : IDbCommand

Creates and returns a Command object associated with the connection.

Dispose ( ) : void

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

ManagedConnection ( IDbConnection connection ) : System

Wrap an IDbConnection object with the managed availablility wrapper.

Open ( ) : void

Opens a database connection with the settings specified by the ConnectionString property of the provider-specific Connection object.

Method Details

BeginTransaction() public method

Begins a database transaction.
public BeginTransaction ( ) : IDbTransaction
return IDbTransaction

BeginTransaction() public method

Begins a database transaction with the specified T:System.Data.IsolationLevel value.
public BeginTransaction ( IsolationLevel il ) : IDbTransaction
il IsolationLevel One of the values.
return IDbTransaction

ChangeDatabase() public method

Changes the current database for an open Connection object.
public ChangeDatabase ( string databaseName ) : void
databaseName string The name of the database to use in place of the current database.
return void

Close() public method

Closes the connection to the database.
public Close ( ) : void
return void

CreateCommand() public method

Creates and returns a Command object associated with the connection.
public CreateCommand ( ) : IDbCommand
return IDbCommand

Dispose() public method

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

ManagedConnection() public method

Wrap an IDbConnection object with the managed availablility wrapper.
This exception is thrown if the object to wrap is null.
public ManagedConnection ( IDbConnection connection ) : System
connection IDbConnection The to wrap
return System

Open() public method

Opens a database connection with the settings specified by the ConnectionString property of the provider-specific Connection object.
public Open ( ) : void
return void