C# 클래스 CodeKing.SqlHarvester.Data.Database

A datalayer used for excecuting commands on the database.
상속: IDataCommand
파일 보기 프로젝트 열기: TheCodeKing/SqlHarvester.Net

공개 메소드들

메소드 설명
AddParameterWithValue ( IDbCommand command, string name, object value ) : void

Adds the parameter with value to the given command. This is becuase IDbCommand does not include the AddWithValue method.

BeginTransaction ( ) : void

Begins a new active transaction.

Commit ( ) : void

Commits the active transaction.

CreateCommand ( string commandText ) : IDbCommand

Creates the concrete command instance to use with this implementation.

Database ( ) : System.Data

Initializes a new instance of the DatabaseAccess class.

Database ( string connectionString ) : System.Data

Initializes a new instance of the DatabaseAccess class.

Database ( string connectionString, int connectionTimeout ) : System.Data

Initializes a new instance of the DatabaseAccess class.

Dispose ( ) : void

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

ExecuteNonQuery ( IDbCommand cmd ) : int

Executes the non query

ExecuteReader ( IDbCommand cmd ) : IDataReader

Executes the reader.

ExecuteScalar ( IDbCommand cmd ) : object

Executes the scalar.

GetConnection ( ) : IDbConnection

Gets the connection.

GetConnection ( IDbCommand cmd ) : IDbConnection

Gets the connection.

Rollback ( ) : void

Rollback the active transaction.

비공개 메소드들

메소드 설명
GetConnectionCheckTransaction ( ) : IDbConnection

메소드 상세

AddParameterWithValue() 공개 메소드

Adds the parameter with value to the given command. This is becuase IDbCommand does not include the AddWithValue method.
public AddParameterWithValue ( IDbCommand command, string name, object value ) : void
command IDbCommand The command.
name string The name.
value object The value.
리턴 void

BeginTransaction() 공개 메소드

Begins a new active transaction.
public BeginTransaction ( ) : void
리턴 void

Commit() 공개 메소드

Commits the active transaction.
public Commit ( ) : void
리턴 void

CreateCommand() 공개 메소드

Creates the concrete command instance to use with this implementation.
public CreateCommand ( string commandText ) : IDbCommand
commandText string The command text.
리턴 IDbCommand

Database() 공개 메소드

Initializes a new instance of the DatabaseAccess class.
public Database ( ) : System.Data
리턴 System.Data

Database() 공개 메소드

Initializes a new instance of the DatabaseAccess class.
public Database ( string connectionString ) : System.Data
connectionString string The connection string.
리턴 System.Data

Database() 공개 메소드

Initializes a new instance of the DatabaseAccess class.
public Database ( string connectionString, int connectionTimeout ) : System.Data
connectionString string The connection string.
connectionTimeout int The connection timeout.
리턴 System.Data

Dispose() 공개 메소드

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

ExecuteNonQuery() 공개 메소드

Executes the non query
public ExecuteNonQuery ( IDbCommand cmd ) : int
cmd IDbCommand The CMD.
리턴 int

ExecuteReader() 공개 메소드

Executes the reader.
public ExecuteReader ( IDbCommand cmd ) : IDataReader
cmd IDbCommand The CMD.
리턴 IDataReader

ExecuteScalar() 공개 메소드

Executes the scalar.
public ExecuteScalar ( IDbCommand cmd ) : object
cmd IDbCommand The CMD.
리턴 object

GetConnection() 공개 메소드

Gets the connection.
public GetConnection ( ) : IDbConnection
리턴 IDbConnection

GetConnection() 공개 메소드

Gets the connection.
public GetConnection ( IDbCommand cmd ) : IDbConnection
cmd IDbCommand The CMD.
리턴 IDbConnection

Rollback() 공개 메소드

Rollback the active transaction.
public Rollback ( ) : void
리턴 void