usingMicrosoft.Practices.EnterpriseLibrary.Common.Configuration;usingMicrosoft.Practices.EnterpriseLibrary.Data;usingMicrosoft.Practices.EnterpriseLibrary.Data.Instrumentation;usingMySql.Data.MySqlClient;namespaceGrass.MySqlDal.Data
{///
///MySql 数据库访问基础///
[ConfigurationElementType(typeof(MySqlDatabaseData))]public classMySqlDatabase : Database
{///
///Initializes a new instance of theclass with a connection string.///
/// The connection string.
public MySqlDatabase(stringconnectionString)
:base(connectionString, MySqlClientFactory.Instance)
{
}///
///Initializes a new instance of theclass with a///connection string and instrumentation provider.///
/// The connection string.
/// The instrumentation provider.
public MySqlDatabase(stringconnectionString, IDataInstrumentationProvider instrumentationProvider)
:base(connectionString, MySqlClientFactory.Instance, instrumentationProvider)
{
}///
///Retrieves parameter information from the stored procedure specified in theand populates the Parameters collection of the specifiedobject.///
/// Theto do the discovery.
/// Themust be ainstance.
protected override voidDeriveParameters(System.Data.Common.DbCommand discoveryCommand)
{
MySqlCommandBuilder.DeriveParameters((MySqlCommand)discoveryCommand);
}
}
}