C# Class ExtendingSample.Components.DefaultConnectionFactory

Example of a real connection factory class. Note that the Type of the connection is a property of the class, so its easy to change to SqlConnection, Odbc, Oracle, MySql etc.
Inheritance: IConnectionFactory
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
CreateConnection ( ) : IDbConnection
DefaultConnectionFactory ( String connectionString ) : System

Method Details

CreateConnection() public method

public CreateConnection ( ) : IDbConnection
return IDbConnection

DefaultConnectionFactory() public method

public DefaultConnectionFactory ( String connectionString ) : System
connectionString String
return System