May 2002
Beginner to intermediate
560 pages
11h 36m
English
To implement the Connection class, you start by implementing IDbConnection, shown in Listing 8-2. Note that IDbConnection inherits from IDisposable.
public interface IDbConnection : IDisposable
{
IDbTransaction BeginTransaction(IsolationLevel iso);
IDbTransaction BeginTransaction();
bool ChangeDatabase(string newdb);
void Close();
IDbCommand CreateCommand();
void Open();
// properties
string ConnectionString {get; set;}
int ConnectionTimeout {get; set;}
string Database {get; set;}
ConnectionState State {get;}
}
|
IDbConnection has six public methods. The most obvious are Open and Close. Because the .NET runtime does not include the concept of ...